Skip to content

Commit 0e24fec

Browse files
committed
Merge branch 'master' into examples
2 parents 0ed900f + c80c130 commit 0e24fec

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" projectVersion)
33
project(fmu4cpp-template VERSION ${projectVersion})
44

55
option(FMU4CPP_BUILD_TESTS "Build internal tests" OFF)
6+
option(FMU4CPP_MSVC_STATIC_CRT "Use static MSVC runtime library" ON)
67

78
set(CMAKE_CXX_STANDARD 17)
89

910
if (POLICY CMP0091)
1011
cmake_policy(SET CMP0091 NEW)
1112
if (WIN32)
12-
# Use static MSVC CRT
13-
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
13+
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 ()
1418
endif ()
1519
endif ()
1620

0 commit comments

Comments
 (0)