vcpkg/ports/fizz/portfile.cmake

42 lines
1.3 KiB
CMake
Raw Normal View History

2018-10-12 13:03:05 +08:00
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebookincubator/fizz
REF "v${VERSION}"
SHA512 c7140b61529ee024e3c99e65d175acb8277fa7bc0090019188481b57c5253d8f5b96a01c28df4a1d00bae67e1f9079d409c2a7f526e933c7fe2f3c2a12fd92ac
2018-10-12 13:03:05 +08:00
HEAD_REF master
PATCHES
0001-fix-libsodium.patch
0002-fix-libevent.patch
0003-fix-deps.patch
2018-10-12 13:03:05 +08:00
)
# 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"
2018-10-12 13:03:05 +08:00
)
vcpkg_cmake_configure(
2018-10-12 13:03:05 +08:00
SOURCE_PATH "${SOURCE_PATH}/fizz"
OPTIONS
-DBUILD_TESTS=OFF
-DBUILD_EXAMPLES=OFF
2018-10-12 13:03:05 +08:00
-DINCLUDE_INSTALL_DIR:STRING=include
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fizz)
2018-10-12 13:03:05 +08:00
vcpkg_copy_pdbs()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake" "lib/cmake/fizz" "share/fizz")
2018-10-12 13:03:05 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2018-10-12 13:03:05 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/fizz/tool/test" "${CURRENT_PACKAGES_DIR}/include/fizz/util/test")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")