2022-10-01 05:48:11 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
2022-11-29 03:14:07 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-11-10)
|
2022-10-01 05:48:11 +08:00
|
|
|
|
2018-03-23 14:03:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO catchorg/Catch2
|
2022-11-29 03:14:07 +08:00
|
|
|
REF v${VERSION}
|
2023-02-03 08:52:36 +08:00
|
|
|
SHA512 93aff3549c3d8454c7deded0e64471f2a8290edfd842c2e0816a353ef9ec2896bee25da6d952cc3bbf022262e22ed2a522485dbfe5d1d492f07eb4c0c2ddb779
|
2021-11-26 17:07:46 +08:00
|
|
|
HEAD_REF devel
|
2022-06-24 05:07:39 +08:00
|
|
|
PATCHES
|
2021-11-26 17:07:46 +08:00
|
|
|
fix-install-path.patch
|
2018-01-12 18:13:55 +08:00
|
|
|
)
|
|
|
|
|
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
|
2022-04-11 23:49:47 +08:00
|
|
|
-DCATCH_INSTALL_DOCS=OFF
|
2022-06-24 05:07:39 +08:00
|
|
|
-DCMAKE_CXX_STANDARD=17
|
2018-01-12 18:13:55 +08:00
|
|
|
)
|
|
|
|
|
2021-08-10 15:59:01 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-04-20 07:48:12 +08:00
|
|
|
|
2022-05-18 17:27:58 +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
|
|
|
|
2022-05-18 17:27:58 +08: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-23 14:03:28 +08:00
|
|
|
|
2022-05-18 17:27:58 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/catch.hpp" "#include <catch2/catch_all.hpp>")
|
2022-11-29 03:14:07 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|