2019-04-23 15:19:51 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO taocpp/pegtl
|
2023-03-02 02:39:14 +08:00
|
|
|
REF 47e878ad4fd72c91253c9d47b6f17e001ca2dfcf # 2.8.3
|
2020-10-13 13:17:32 -07:00
|
|
|
SHA512 c7761e36dd28914d89a2d5e2a5ce5ea84bab50b7f7ad235b18dbeca41a675503b00b0fe152247515f81ec380f3c68cf827e667cb3b9a7e34c6d2f5dd60fb4106
|
2019-04-23 15:19:51 -07:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-04-23 15:19:51 -07:00
|
|
|
OPTIONS
|
|
|
|
-DPEGTL_BUILD_TESTS=OFF
|
|
|
|
-DPEGTL_BUILD_EXAMPLES=OFF
|
|
|
|
-DPEGTL_INSTALL_INCLUDE_DIR=include/pegtl-2
|
|
|
|
-DPEGTL_INSTALL_DOC_DIR=share/pegtl-2
|
|
|
|
-DPEGTL_INSTALL_CMAKE_DIR=share/pegtl-2/cmake
|
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-04-23 15:19:51 -07:00
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/pegtl-2/cmake)
|
2019-04-23 15:19:51 -07:00
|
|
|
|
2023-03-02 02:39:14 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
|
2019-04-23 15:19:51 -07:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-03-02 02:39:14 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|
2019-04-23 15:19:51 -07:00
|
|
|
|
|
|
|
# Handle collision with latest pegtl
|
2023-03-02 02:39:14 +08:00
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config-version.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config-version.cmake")
|