[CMAKE] Set CMAKE_MSVC_RUNTIME_LIBRARY to satisfy CMP0091. CORE-17109

We use /NODEFAULTLIB, and consequently also don't want CMake to add
a default library for us.
This commit is contained in:
Thomas Faber 2020-06-07 00:20:09 +02:00
parent 94073cc1d9
commit 3169c94e06
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -157,6 +157,7 @@ endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE ${_hotpatch_link_flag} /IGNORE:4039")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE ${_hotpatch_link_flag} /IGNORE:4104 /IGNORE:4039")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE ${_hotpatch_link_flag} /IGNORE:4039")
set(CMAKE_MSVC_RUNTIME_LIBRARY "")
# HACK: Remove the /implib argument, implibs are generated separately
string(REPLACE "/implib:<TARGET_IMPLIB>" "" CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}")