vcpkg/ports/gtl/portfile.cmake

26 lines
835 B
CMake
Raw Normal View History

#header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO greg7mdp/gtl
REF v1.1.2
SHA512 f609b965826f738592d85b015c3a5d29830cebc457e21987aaa69ab0fc4336adfd69538d81bd8b46c9467a449d7c25dd92fd3fa0ec86e68e423a4abf2bafa517
HEAD_REF main
)
# Use greg7mdp/gtl's own build process, skipping examples and tests
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DGTL_BUILD_TESTS=OFF
-DGTL_BUILD_EXAMPLES=OFF
-DGTL_BUILD_BENCHMARKS=OFF
)
vcpkg_cmake_install()
# Delete redundant directories
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/debug" "${CURRENT_PACKAGES_DIR}/share/doc")
# Put the licence file where vcpkg expects it
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)