vcpkg/ports/catch2/portfile.cmake

31 lines
967 B
CMake
Raw Normal View History

2018-01-12 18:13:55 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO catchorg/Catch2
2018-12-15 09:00:47 +08:00
REF v2.5.0
SHA512 420f1d1a5ea7b69be9fb316a8abe1fb7c7e78d44a982e883748f1e0c8d2a435c1518b6022742716019558a740f8b31977ed6a786b0293e0504206b016801cfe8
HEAD_REF master
2018-01-12 18:13:55 +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
)
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)
if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp)
message(FATAL_ERROR "Main includes have moved. Please update the forwarder.")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include <catch2/catch.hpp>")
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright)