Files
CMake/Utilities/Release/WiX/CustomAction/CMakeLists.txt
T
Brad King ed54d87789 Configure CMake itself with policies through CMake 3.15
In particular, set `CMP0091` to `NEW` to enable the MSVC runtime library
abstraction so it can be set via `CMAKE_MSVC_RUNTIME_LIBRARY` in the
cache.
2019-08-23 10:55:58 -04:00

20 lines
493 B
CMake

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
exports.def
)
target_link_libraries(CMakeWiXCustomActions PRIVATE msi)