diff options
Diffstat (limited to 'Utilities/Release/WiX/CustomAction/CMakeLists.txt')
-rw-r--r-- | Utilities/Release/WiX/CustomAction/CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Utilities/Release/WiX/CustomAction/CMakeLists.txt b/Utilities/Release/WiX/CustomAction/CMakeLists.txt index 7efd01e..9d89dd8 100644 --- a/Utilities/Release/WiX/CustomAction/CMakeLists.txt +++ b/Utilities/Release/WiX/CustomAction/CMakeLists.txt @@ -1,9 +1,15 @@ -foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) - string(REPLACE "/MD" "/MT" - "CMAKE_CXX_FLAGS_${CONFIG}" - "${CMAKE_CXX_FLAGS_${CONFIG}}" - ) -endforeach() +if(MSVC) + if(NOT CMAKE_VERSION VERSION_LESS 3.15) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") + else() + foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) + string(REPLACE "/MD" "/MT" + "CMAKE_CXX_FLAGS_${CONFIG}" + "${CMAKE_CXX_FLAGS_${CONFIG}}" + ) + endforeach() + endif() +endif() add_library(CMakeWiXCustomActions MODULE detect_nsis_overwrite.cpp |