2020-09-28 09:55:52 +08:00
|
|
|
vcpkg_find_acquire_program(FLEX)
|
|
|
|
vcpkg_find_acquire_program(BISON)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO facebook/fbthrift
|
2023-06-01 03:24:33 +08:00
|
|
|
REF "v${VERSION}"
|
2023-10-03 07:03:31 +08:00
|
|
|
SHA512 8730c2ecfeccf221e746df9f8e449d31934fd7e6f7861631d4c38e891cfc7b5ab07ffb48b56048031820f771966d6435bee2996738934bca9324548aeba5b30d
|
2020-09-28 09:55:52 +08:00
|
|
|
HEAD_REF master
|
2022-06-24 06:29:07 +08:00
|
|
|
PATCHES
|
|
|
|
fix-glog.patch
|
2023-04-18 07:33:49 +08:00
|
|
|
0002-fix-dependency.patch
|
2020-09-28 09:55:52 +08:00
|
|
|
)
|
|
|
|
|
2023-04-18 07:33:49 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindGMock.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindOpenSSL.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindZstd.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGflags.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGlog.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGMock.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindLibEvent.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindSodium.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindZstd.cmake")
|
2022-02-10 05:05:38 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-02-17 11:56:04 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-09-28 09:55:52 +08:00
|
|
|
OPTIONS
|
2022-02-17 11:56:04 +08:00
|
|
|
"-DBISON_EXECUTABLE=${BISON}"
|
|
|
|
"-DFLEX_EXECUTABLE=${FLEX}"
|
2020-09-28 09:55:52 +08:00
|
|
|
)
|
|
|
|
|
2022-02-10 05:05:38 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fbthrift)
|
2020-09-28 09:55:52 +08:00
|
|
|
|
2022-02-10 05:05:38 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2020-09-28 09:55:52 +08:00
|
|
|
|
|
|
|
# There should be no empty directories in vcpkg/packages/fbthrift_x64-linux
|
|
|
|
file(REMOVE_RECURSE
|
2022-02-10 05:05:38 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/transport/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/util/test"
|
2023-10-03 07:03:31 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/detail/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/debug_thrift_data_difference/test"
|
2022-02-10 05:05:38 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/server/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/common/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/core/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/inmemory/test"
|
2023-07-06 02:59:03 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/rocket/client/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/rocket/framing/parser/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/rocket/server/test"
|
2022-02-10 05:05:38 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/protocol/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/extensions/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/frozen/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/reflection/docs"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/test"
|
2023-06-01 03:24:33 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/gtest/test"
|
2022-02-10 05:05:38 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/visitation/test"
|
2022-03-29 04:39:28 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/server/test"
|
2022-02-10 05:05:38 +08:00
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/benchmark"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/thrift/lib/thrift/annotation"
|
2020-09-28 09:55:52 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN)
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-03-22 10:39:28 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
|
|
|
|
"${PACKAGE_PREFIX_DIR}/lib/cmake/fbthrift" "${PACKAGE_PREFIX_DIR}/share/fbthrift")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
|
|
|
|
"${PACKAGE_PREFIX_DIR}/bin/thrift1.exe" "${PACKAGE_PREFIX_DIR}/tools/fbthrift/thrift1.exe")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftConfig.cmake"
|
|
|
|
"${PACKAGE_PREFIX_DIR}/bin/thrift1" "${PACKAGE_PREFIX_DIR}/tools/fbthrift/thrift1")
|
|
|
|
endif()
|
|
|
|
|
2022-03-29 04:39:28 +08:00
|
|
|
# Only used internally and removed in master
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fbthrift/FBThriftTargets.cmake" "LOCATION_HH=\\\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/thrift/compiler/location.hh\\\"" "")
|
|
|
|
|
2020-09-28 09:55:52 +08:00
|
|
|
# Handle copyright
|
2023-07-06 02:59:03 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|