diff options
| author | Yuxuan He <yuxuan.he@hypereal.com> | 2017-05-23 00:00:19 +0800 |
|---|---|---|
| committer | Yuxuan He <yuxuan.he@hypereal.com> | 2017-05-23 00:00:19 +0800 |
| commit | e70e4db4b46e925c1867ba9880eb5a2b3fb741a3 (patch) | |
| tree | b62e5478d6b070ff153ee798a41b0b390d3fc3f6 | |
| parent | fb689bd13dd6ba563a885d71fff1dd2b32a615db (diff) | |
| download | vcpkg-e70e4db4b46e925c1867ba9880eb5a2b3fb741a3.tar.gz vcpkg-e70e4db4b46e925c1867ba9880eb5a2b3fb741a3.zip | |
Add support for gtest's dynamic CRT + static linkiing.
| -rw-r--r-- | ports/gtest/portfile.cmake | 7 |
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() |
