mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-07-23 11:20:53 -05:00
feat: add webm support (#1391)
This commit is contained in:
25
thirdparty/CMakeLists.txt
vendored
25
thirdparty/CMakeLists.txt
vendored
@@ -18,3 +18,28 @@ if(SD_WEBP AND NOT SD_USE_SYSTEM_WEBP)
|
||||
|
||||
add_subdirectory(libwebp EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
||||
if(SD_WEBM AND NOT SD_USE_SYSTEM_WEBM)
|
||||
if(MSVC)
|
||||
set(MSVC_RUNTIME dll)
|
||||
endif()
|
||||
set(ENABLE_WEBMTS OFF)
|
||||
set(ENABLE_WEBMINFO OFF)
|
||||
set(ENABLE_TESTS OFF)
|
||||
set(ENABLE_WEBM_PARSER OFF)
|
||||
set(ENABLE_SAMPLE_PROGRAMS OFF)
|
||||
|
||||
set(SD_LIBWEBM_PARENT_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
add_subdirectory(libwebm EXCLUDE_FROM_ALL)
|
||||
|
||||
# libwebm mutates the global CMAKE_CXX_FLAGS for non-MSVC compilers to force
|
||||
# C++11. Restore the parent flags so the main project keeps its own C++17
|
||||
# requirements, then pin the libwebm targets to C++17 explicitly.
|
||||
set(CMAKE_CXX_FLAGS "${SD_LIBWEBM_PARENT_CXX_FLAGS}" CACHE STRING "" FORCE)
|
||||
target_compile_features(mkvmuxer PRIVATE cxx_std_17)
|
||||
target_compile_features(mkvparser PRIVATE cxx_std_17)
|
||||
target_compile_features(webm PRIVATE cxx_std_17)
|
||||
|
||||
target_include_directories(webm INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libwebm)
|
||||
endif()
|
||||
|
||||
1
thirdparty/libwebm
vendored
Submodule
1
thirdparty/libwebm
vendored
Submodule
Submodule thirdparty/libwebm added at 5bf12267ee
Reference in New Issue
Block a user