2018-01-12 11:13:55 +01:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2018-03-22 23:03:28 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO catchorg/Catch2
|
2019-05-08 17:51:44 -07:00
|
|
|
REF v2.7.2
|
|
|
|
SHA512 ac58cb3b676c73a361a494492e7b1f1b85cba7d08feb2d09b2269109a89b66aa37efead6b0a9fca64678f42a3395a3b02b6d461b4cb35310451ce849a79d04ae
|
2018-03-22 23:03:28 -07:00
|
|
|
HEAD_REF master
|
2018-01-12 11:13:55 +01:00
|
|
|
)
|
|
|
|
|
2018-03-22 23:03:28 -07:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DCATCH_BUILD_EXAMPLES=OFF
|
2018-01-12 11:13:55 +01:00
|
|
|
)
|
|
|
|
|
2018-03-22 23:03:28 -07: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-30 20:28:12 +02:00
|
|
|
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp)
|
2018-03-22 23:03:28 -07:00
|
|
|
message(FATAL_ERROR "Main includes have moved. Please update the forwarder.")
|
|
|
|
endif()
|
|
|
|
|
2018-07-30 20:28:12 +02:00
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include <catch2/catch.hpp>")
|
2018-03-22 23:03:28 -07:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright)
|