mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 12:30:26 +08:00
31 lines
965 B
CMake
31 lines
965 B
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO catchorg/Catch2
|
|
REF v2.2.1
|
|
SHA512 48d3a0384dcd19fe622c4fda51639be36c904aaff77f5857615010c57e69d8e9f1deb2156e3e4882a592fe260d2bae0efa3cd02c2a2cabe07d9f9db09051a6b0
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DBUILD_TESTING=OFF
|
|
-DCATCH_BUILD_EXAMPLES=OFF
|
|
)
|
|
|
|
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)
|