vcpkg/ports/fizz/portfile.cmake
Jia Yue Hua 50a5ff3563
[folly,fbthrift,mvfst,fizz,wangle,proxygen]: update to 2023.05.15 (#31657)
* [folly]: update to 2023.05.15

* remove no more used patch

* fix mvfst

* fix rsocket

* revert indent

* fix space
2023-05-31 12:24:33 -07:00

42 lines
1.3 KiB
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebookincubator/fizz
REF "v${VERSION}"
SHA512 6b057a0610e12e1bbfa668f0233d0daf0ce872247deaa9301bd8b842c7c01afd78812fe2170479b128852c4bf22dffd4a5d84b1970e59e4e82f35b0fb7e54e5e
HEAD_REF master
PATCHES
0001-fix-libsodium.patch
0002-fix-libevent.patch
0003-fix-deps.patch
)
# Prefer installed config files
file(REMOVE
"${SOURCE_PATH}/fizz/cmake/FindGMock.cmake"
"${SOURCE_PATH}/fizz/cmake/FindGflags.cmake"
"${SOURCE_PATH}/fizz/cmake/FindGlog.cmake"
"${SOURCE_PATH}/fizz/cmake/FindLibevent.cmake"
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/fizz"
OPTIONS
-DBUILD_TESTS=OFF
-DBUILD_EXAMPLES=OFF
-DINCLUDE_INSTALL_DIR:STRING=include
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fizz)
vcpkg_copy_pdbs()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake" "lib/cmake/fizz" "share/fizz")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/fizz/tool/test" "${CURRENT_PACKAGES_DIR}/include/fizz/util/test")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)