We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0ed900f + c80c130 commit 0e24fecCopy full SHA for 0e24fec
1 file changed
CMakeLists.txt
@@ -3,14 +3,18 @@ file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" projectVersion)
3
project(fmu4cpp-template VERSION ${projectVersion})
4
5
option(FMU4CPP_BUILD_TESTS "Build internal tests" OFF)
6
+option(FMU4CPP_MSVC_STATIC_CRT "Use static MSVC runtime library" ON)
7
8
set(CMAKE_CXX_STANDARD 17)
9
10
if (POLICY CMP0091)
11
cmake_policy(SET CMP0091 NEW)
12
if (WIN32)
- # Use static MSVC CRT
13
- set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
+ if (FMU4CPP_MSVC_STATIC_CRT)
14
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
15
+ else ()
16
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
17
+ endif ()
18
endif ()
19
20
0 commit comments