Skip to content

Commit

Permalink
Added USE_STATIC_MSVC_RUNTIME cmake option
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenSauce04 authored and padenot committed Nov 20, 2024
1 parent 0426c85 commit d504c22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d504c22

Please sign in to comment.