2022-10-01 05:48:11 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
2018-03-22 23:03:28 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO catchorg/Catch2
|
2022-11-28 20:14:07 +01:00
|
|
|
REF v${VERSION}
|
2024-01-16 19:51:41 +01:00
|
|
|
SHA512 1b9d5f35144f6c7acef0e76558a4adf3ff41c2c2292fbdcb3e2c2917fa2deb7fba593738105dd3c111f02ee8aca64010cf68f69bb8fb1815dbf771b509ab0576
|
2021-11-26 17:07:46 +08:00
|
|
|
HEAD_REF devel
|
2022-06-23 14:07:39 -07:00
|
|
|
PATCHES
|
2021-11-26 17:07:46 +08:00
|
|
|
fix-install-path.patch
|
2018-01-12 11:13:55 +01:00
|
|
|
)
|
|
|
|
|
2021-08-10 15:59:01 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-08-12 23:37:35 -07:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-03-22 23:03:28 -07:00
|
|
|
OPTIONS
|
2022-04-11 17:49:47 +02:00
|
|
|
-DCATCH_INSTALL_DOCS=OFF
|
2022-06-23 14:07:39 -07:00
|
|
|
-DCMAKE_CXX_STANDARD=17
|
2018-01-12 11:13:55 +01:00
|
|
|
)
|
|
|
|
|
2021-08-10 15:59:01 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-04-20 01:48:12 +02:00
|
|
|
|
2022-05-18 11:27:58 +02:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Catch2)
|
2021-08-10 15:59:01 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-06-22 07:31:23 +02:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/catch2-with-main.pc" [["-L${libdir}"]] [["-L${libdir}/manual-link"]])
|
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/catch2-with-main.pc" [["-L${libdir}"]] [["-L${libdir}/manual-link"]])
|
|
|
|
endif()
|
2018-03-22 23:03:28 -07:00
|
|
|
|
2021-08-10 15:59:01 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2018-03-22 23:03:28 -07:00
|
|
|
|
2022-05-18 11:27:58 +02:00
|
|
|
# We remove these folders because they are empty and cause warnings on the library installation
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/catch2/benchmark/internal")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/catch2/generators/internal")
|
2018-03-22 23:03:28 -07:00
|
|
|
|
2022-05-18 11:27:58 +02:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/catch.hpp" "#include <catch2/catch_all.hpp>")
|
2022-11-28 20:14:07 +01:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|