aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarc Boucek <mohinda@gmail.com>2020-03-13 19:23:11 +0100
committerGitHub <noreply@github.com>2020-03-13 11:23:11 -0700
commitb2e928f19b517f2b60ba2a9655cbd646185d7231 (patch)
treedff730bc64b3478934cdbe160d245b48ac624297 /scripts
parentfea4df8b23ff90610aff5ee99fafe62c57da36ad (diff)
downloadvcpkg-b2e928f19b517f2b60ba2a9655cbd646185d7231.tar.gz
vcpkg-b2e928f19b517f2b60ba2a9655cbd646185d7231.zip
[vcpkg] set CMAKE_MSVC_RUNTIME_LIBRARY for cmake policy CMP0091 (#9452)
Co-authored-by: Marc Boucek <marc.boucek@native-instruments.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/toolchains/windows.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake
index d5d7f8db5..43e6d2c2d 100644
--- a/scripts/toolchains/windows.cmake
+++ b/scripts/toolchains/windows.cmake
@@ -1,3 +1,7 @@
+if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
+set(_VCPKG_WINDOWS_TOOLCHAIN 1)
+set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<STREQUAL:${VCPKG_CRT_LINKAGE},dynamic>:DLL>" CACHE STRING "")
+
get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
if(NOT _CMAKE_IN_TRY_COMPILE)
@@ -29,3 +33,4 @@ if(NOT _CMAKE_IN_TRY_COMPILE)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
endif()
+endif()