2022-11-17 05:37:32 +08:00
|
|
|
vcpkg_from_github(
|
2018-12-19 08:12:19 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2022-11-17 05:37:32 +08:00
|
|
|
REPO antlr/antlr4
|
2023-07-20 05:18:40 +08:00
|
|
|
HEAD_REF dev
|
|
|
|
REF "${VERSION}"
|
2023-09-29 14:00:44 +08:00
|
|
|
SHA512 79ac3cdfc8f2368c647d06aec85d87507629a75527205ff2cbf7d9802989b0c6e6a8fac76148ad101f539c9ef922e431e22ba489f899f847ccc3d3d889bb2b70
|
2022-01-26 02:31:15 +08:00
|
|
|
PATCHES
|
2023-02-04 05:01:19 +08:00
|
|
|
set-export-macro-define-as-private.patch
|
2016-12-25 18:44:20 +08:00
|
|
|
)
|
|
|
|
|
2022-11-17 05:37:32 +08:00
|
|
|
set(RUNTIME_PATH "${SOURCE_PATH}/runtime/Cpp")
|
|
|
|
|
|
|
|
message(INFO "Configure at '${RUNTIME_PATH}'")
|
|
|
|
|
2023-07-20 05:18:40 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
|
|
|
|
|
2022-01-14 01:23:06 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-11-17 05:37:32 +08:00
|
|
|
SOURCE_PATH "${RUNTIME_PATH}"
|
2022-04-19 07:44:47 +08:00
|
|
|
OPTIONS
|
2023-07-20 05:18:40 +08:00
|
|
|
-DANTLR_BUILD_STATIC=${BUILD_STATIC}
|
|
|
|
-DANTLR_BUILD_SHARED=${BUILD_SHARED}
|
2022-04-19 07:44:47 +08:00
|
|
|
-DANTLR4_INSTALL=ON
|
2022-06-25 06:11:33 +08:00
|
|
|
-DANTLR_BUILD_CPP_TESTS=OFF
|
2016-12-25 18:44:20 +08:00
|
|
|
)
|
|
|
|
|
2022-01-14 01:23:06 +08:00
|
|
|
vcpkg_cmake_install()
|
2022-04-19 07:44:47 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME antlr4-generator CONFIG_PATH lib/cmake/antlr4-generator DO_NOT_DELETE_PARENT_CONFIG_PATH)
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME antlr4-runtime CONFIG_PATH lib/cmake/antlr4-runtime)
|
2019-03-09 14:09:33 +08:00
|
|
|
|
2022-04-19 07:44:47 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2016-12-25 18:44:20 +08:00
|
|
|
|
2019-03-09 14:09:33 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2023-07-20 05:18:40 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|