Skip to content

Commit fe1ff06

Browse files
committed
Use static MSVC CRT
1 parent 00fca12 commit fe1ff06

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@ set(CMAKE_CXX_STANDARD 17)
99
if (POLICY CMP0091)
1010
cmake_policy(SET CMP0091 NEW)
1111
if (WIN32)
12-
# Single-config generators (Ninja, Make): pick based on CMAKE_BUILD_TYPE
13-
if (NOT CMAKE_CONFIGURATION_TYPES)
14-
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
15-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebugDLL" CACHE STRING "" FORCE)
16-
else()
17-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL" CACHE STRING "" FORCE)
18-
endif()
19-
endif()
12+
# Use static MSVC CRT
13+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
2014
endif ()
2115
endif ()
2216

0 commit comments

Comments
 (0)