diff options
author | OpenSauce04 <[email protected]> | 2024-11-19 16:41:20 +0000 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2024-11-20 16:54:43 +0100 |
commit | d504c22284d55a8cfd7323973f302dfa2bf93565 (patch) | |
tree | 6da15dd78c472cfb11a680eb61341a444cb9ce1f | |
parent | 0426c8532a429f4ac58ba3f27ba606d79418350b (diff) | |
download | cubeb-d504c22284d55a8cfd7323973f302dfa2bf93565.tar.gz cubeb-d504c22284d55a8cfd7323973f302dfa2bf93565.zip |
Added `USE_STATIC_MSVC_RUNTIME` cmake option
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dd03d04..cdb65d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,10 @@ option(BUILD_TOOLS "Build tools" ON) option(BUNDLE_SPEEX "Bundle the speex library" OFF) option(LAZY_LOAD_LIBS "Lazily load shared libraries" ON) option(USE_SANITIZERS "Use sanitizers" ON) -# Set debugging for runtime libraries if requested. -set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") +option(USE_STATIC_MSVC_RUNTIME "Use /MT instead of /MD in MSVC" OFF) +if(USE_STATIC_MSVC_RUNTIME) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") +endif() if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING |