vcpkg/ports/pegtl/portfile.cmake

28 lines
848 B
CMake

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO taocpp/pegtl
REF 9d58962818d69436384044e0a578239548f42a7b
SHA512 16f02bbdb9b601ea3c7ad3db29267bc7615aa6e5c6b3abf693c4e208e2236305cff1e2aa41b2caeb453f122f011ef56c57dd52be7258f95b21c6536482aa6a3d
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DPEGTL_BUILD_TESTS=OFF
-DPEGTL_BUILD_EXAMPLES=OFF
-DPEGTL_INSTALL_DOC_DIR=share/pegtl
-DPEGTL_INSTALL_CMAKE_DIR=share/pegtl/cmake
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
# Handle copyright
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl/LICENSE ${CURRENT_PACKAGES_DIR}/share/pegtl/copyright)