vcpkg/ports/catch2/portfile.cmake
Robert Schumacher 516d10bb68 [many ports] Updates 2019.04.19 (#6155)
* [many ports] Updates 2019.04.19
2019-04-30 09:20:18 -07:00

31 lines
967 B
CMake

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO catchorg/Catch2
REF v2.7.1
SHA512 1566f63122984a8f29645db8e76028ba2559bb4b812f1e15081f79725530effe2ff432b6f61f404dc2b386829004d126b9511053d25a811c017f3102a01608a1
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/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)