vcpkg/ports/mvfst/portfile.cmake

29 lines
898 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/mvfst
REF "v${VERSION}"
SHA512 6bcc4df79b42bafb06ee69f253733dd5136ef329b8009fc5677f62c3476d205f5f0cdcca242d0bde15914bf487a37aeeab1adb4ad555d2edd5e6b3935e84dd37
HEAD_REF main
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTS=OFF
-DBUILD_EXAMPLES=OFF
)
# 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_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mvfst)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)