2022-11-17 05:37:32 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12)
|
2016-12-25 18:44:20 +08:00
|
|
|
|
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
|
|
|
|
HEAD_REF master
|
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 a52356410c95ec6d7128b856dcf4c20a17cdd041270d2c4d700ef02ea715c87a00a87c2ad560277424b300435c6e9b196c8bc9c9f50ae5b6804d8214b4d397d0
|
2022-01-26 02:31:15 +08:00
|
|
|
PATCHES
|
2022-11-17 05:37:32 +08:00
|
|
|
fix_build_4.11.1.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}'")
|
|
|
|
|
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
|
|
|
|
-DANTLR4_INSTALL=ON
|
2022-06-25 06:11:33 +08:00
|
|
|
-DANTLR_BUILD_CPP_TESTS=OFF
|
2022-11-17 05:37:32 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
"-DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/dist"
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
"-DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/dist"
|
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()
|
|
|
|
|
2022-11-17 05:37:32 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|