vcpkg/ports/catch2/portfile.cmake

31 lines
965 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-06-13 01:32:58 +08:00
REF v2.2.3
SHA512 d065d5797045ce85f576977f78cbdc77a1e8ab820e164aafd91d305aa10a29f7f306734d484714ec05078858457d0a17a57a6246166da3c8f3c708a23a2adc46
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/catch/catch.hpp)
message(FATAL_ERROR "Main includes have moved. Please update the forwarder.")
endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include <catch/catch.hpp>")
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright)