2018-03-23 14:03:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO catchorg/Catch2
|
2021-08-13 14:37:35 +08:00
|
|
|
REF v2.13.7
|
|
|
|
SHA512 1c3cbdecc6a3b59360a97789c4784d79d027e1b63bdc42b0e152c3272f7bad647fcd1490aa5caf67f968a6311dc9624b5a70d5eb3fbc1d5179d520e09b76c9ed
|
2018-03-23 14:03:28 +08:00
|
|
|
HEAD_REF master
|
2021-08-10 15:59:01 +08:00
|
|
|
PATCHES fix-install-path.patch
|
2018-01-12 18:13:55 +08:00
|
|
|
)
|
|
|
|
|
2021-08-13 14:37:35 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
2021-08-10 15:59:01 +08:00
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
2021-08-13 14:37:35 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-03-23 14:03:28 +08:00
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DCATCH_BUILD_EXAMPLES=OFF
|
2021-08-10 15:59:01 +08:00
|
|
|
-DCATCH_BUILD_STATIC_LIBRARY=${BUILD_STATIC}
|
2018-01-12 18:13:55 +08:00
|
|
|
)
|
|
|
|
|
2021-08-10 15:59:01 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-03-23 14:03:28 +08:00
|
|
|
|
2021-07-07 04:36:25 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/Catch2" "${CURRENT_PACKAGES_DIR}/share/catch2_")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/catch2_" "${CURRENT_PACKAGES_DIR}/share/catch2")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/Catch2" "${CURRENT_PACKAGES_DIR}/debug/share/catch2_")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/catch2_" "${CURRENT_PACKAGES_DIR}/debug/share/catch2")
|
2021-04-20 07:48:12 +08:00
|
|
|
|
2021-08-13 14:37:35 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Catch2")
|
2021-08-10 15:59:01 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-03-23 14:03:28 +08: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-23 14:03:28 +08:00
|
|
|
|
2021-04-20 07:48:12 +08:00
|
|
|
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp")
|
2018-03-23 14:03:28 +08:00
|
|
|
message(FATAL_ERROR "Main includes have moved. Please update the forwarder.")
|
|
|
|
endif()
|
|
|
|
|
2021-04-20 07:48:12 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/catch.hpp" "#include <catch2/catch.hpp>")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|