2018-01-12 18:13:55 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2018-03-23 14:03:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO catchorg/Catch2
|
2019-02-08 04:07:20 +08:00
|
|
|
REF v2.6.0
|
|
|
|
SHA512 8d693cce413421ca747a0a3864d72c20f30fb8e432eb1f13e69605a71cc4e536d6710561f989cce6783d28f8b667b8da42c624056c4d412852885a8cf0df1e5d
|
2018-03-23 14:03:28 +08:00
|
|
|
HEAD_REF master
|
2018-01-12 18:13:55 +08:00
|
|
|
)
|
|
|
|
|
2018-03-23 14:03:28 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DCATCH_BUILD_EXAMPLES=OFF
|
2018-01-12 18:13:55 +08:00
|
|
|
)
|
|
|
|
|
2018-03-23 14:03:28 +08:00
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2 TARGET_PATH share/catch2)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
|
|
|
|
|
2018-07-31 02:28: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()
|
|
|
|
|
2018-07-31 02:28:12 +08:00
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include <catch2/catch.hpp>")
|
2018-03-23 14:03:28 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright)
|