2017-05-03 05:12:40 -07:00
|
|
|
if (EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src)
|
2016-09-21 16:33:07 +03:00
|
|
|
endif()
|
|
|
|
|
2017-05-03 05:12:40 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/googletest
|
2022-07-08 15:25:01 -04:00
|
|
|
REF release-1.12.1
|
|
|
|
SHA512 a9104dc6c53747e36e7dd7bb93dfce51a558bd31b487a9ef08def095518e1296da140e0db263e0644d9055dbd903c0cb69380cb2322941dbfb04780ef247df9c
|
2021-11-22 18:39:52 -05:00
|
|
|
HEAD_REF main
|
2018-11-14 22:05:11 +03:00
|
|
|
PATCHES
|
2022-04-05 19:57:13 +02:00
|
|
|
clang-tidy-no-lint.patch
|
2019-07-18 00:11:23 -07:00
|
|
|
fix-main-lib-path.patch
|
2017-05-03 05:12:40 -07:00
|
|
|
)
|
2016-09-21 16:33:07 +03:00
|
|
|
|
2017-12-13 10:34:16 +09:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT)
|
2017-05-23 00:00:19 +08:00
|
|
|
|
2022-03-28 16:31:07 -04:00
|
|
|
vcpkg_cmake_configure(
|
2017-05-03 05:12:40 -07:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-11-14 22:05:11 +03:00
|
|
|
OPTIONS
|
2017-12-13 10:34:16 +09:00
|
|
|
-DBUILD_GMOCK=ON
|
|
|
|
-Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT}
|
2016-09-21 16:33:07 +03:00
|
|
|
)
|
|
|
|
|
2022-03-28 16:31:07 -04:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/GTest)
|
2017-05-03 05:12:40 -07:00
|
|
|
|
2017-11-27 00:51:32 +09:00
|
|
|
file(
|
|
|
|
INSTALL
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest_main.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-all.cc"
|
2022-06-24 21:47:34 +01:00
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-assertion-result.cc"
|
2017-11-27 00:51:32 +09:00
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-death-test.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-filepath.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-internal-inl.h"
|
2019-03-05 03:29:28 +09:00
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-matchers.cc"
|
2017-11-27 00:51:32 +09:00
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-port.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-printers.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-test-part.cc"
|
|
|
|
"${SOURCE_PATH}/googletest/src/gtest-typed-test.cc"
|
|
|
|
DESTINATION
|
|
|
|
${CURRENT_PACKAGES_DIR}/src
|
|
|
|
)
|
|
|
|
|
2016-09-21 16:33:07 +03:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-02-20 17:59:02 -05:00
|
|
|
|
2021-10-27 01:03:33 +02:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-11-04 05:46:49 +01:00
|
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmock_main.pc" "libdir=\${prefix}/lib" "libdir=\${prefix}/lib/manual-link")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gtest_main.pc" "libdir=\${prefix}/lib" "libdir=\${prefix}/lib/manual-link")
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmock_main.pc" "libdir=\${prefix}/lib" "libdir=\${prefix}/lib/manual-link")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gtest_main.pc" "libdir=\${prefix}/lib" "libdir=\${prefix}/lib/manual-link")
|
|
|
|
endif()
|
2016-09-21 16:33:07 +03:00
|
|
|
vcpkg_copy_pdbs()
|
2017-11-16 23:54:55 -08:00
|
|
|
|
2021-02-08 17:08:25 -05:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|