diff --git a/CMakeLists.txt b/CMakeLists.txt index a5573ab3..0f7dd734 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$<$:Debug>") +option(USE_STATIC_MSVC_RUNTIMES "Use /MT instead of /MD in MSVC" OFF) +if(USE_STATIC_MSVC_RUNTIME) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING