diff options
| -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() |
