aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuxuan He <yuxuan.he@hypereal.com>2017-05-23 00:00:19 +0800
committerYuxuan He <yuxuan.he@hypereal.com>2017-05-23 00:00:19 +0800
commite70e4db4b46e925c1867ba9880eb5a2b3fb741a3 (patch)
treeb62e5478d6b070ff153ee798a41b0b390d3fc3f6
parentfb689bd13dd6ba563a885d71fff1dd2b32a615db (diff)
downloadvcpkg-e70e4db4b46e925c1867ba9880eb5a2b3fb741a3.tar.gz
vcpkg-e70e4db4b46e925c1867ba9880eb5a2b3fb741a3.zip
Add support for gtest's dynamic CRT + static linkiing.
-rw-r--r--ports/gtest/portfile.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake
index ea5186e47..a92eec31a 100644
--- a/ports/gtest/portfile.cmake
+++ b/ports/gtest/portfile.cmake
@@ -17,8 +17,15 @@ vcpkg_apply_patches(
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch
)
+if (VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ set(gtest_force_shared_crt YES)
+else()
+ set(gtest_force_shared_crt NO)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS -Dgtest_force_shared_crt=${gtest_force_shared_crt}
)
vcpkg_install_cmake()