vcpkg/ports/fbthrift/portfile.cmake
Billy O'Neal c9e786d81a
[many ports] remove remaining vcpkg_fail_port_install calls. (#22770)
* Bulk remove vcpkg_fail_port_install calls.

Interesting ones have been split out into separate reviews, where "interesting" means "anything more than just deleting the call to vcpkg_fail_port_install",

In support of https://github.com/microsoft/vcpkg/pull/21502

* Update version database.

* Revert google benchmark changes already submitted as https://github.com/microsoft/vcpkg/pull/22728

* Repair version database.
2022-01-25 10:31:15 -08:00

55 lines
2.2 KiB
CMake

vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(BISON)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/fbthrift
REF v2021.06.14.00
SHA512 e59465adcd57722626e5a4407529b164472cde3942bd100b3d6e92c5057f88f1a8544b7181a01e05ed3077ffd2b3811b687aa6741d08aedef6b79aea02305798
HEAD_REF master
PATCHES
fix-sodium-target.patch # fixed in master
fix-zlib.patch # fixed in master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBISON_EXECUTABLE=${BISON}
-DFLEX_EXECUTABLE=${FLEX}
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fbthrift)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# There should be no empty directories in vcpkg/packages/fbthrift_x64-linux
file(REMOVE_RECURSE
${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
${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
${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
${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test
${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/benchmark
${CURRENT_PACKAGES_DIR}/include/thrift/lib/thrift/annotation
)
vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN)
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)