2023-08-08 00:05:51 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO yhirose/cpp-httplib
|
|
|
|
REF "v${VERSION}"
|
2024-09-04 02:14:28 +08:00
|
|
|
SHA512 b4c29ba7d4b832722cda01a03c8ba8c2a318afaaf7dbf5cde9aa21d0626070e61e3c39f547c8068ca7da076a96e6a0da526b80c75e33944a51665879ff45f2c7
|
2023-08-08 00:05:51 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
fix-find-brotli.patch
|
|
|
|
)
|
|
|
|
|
2023-09-08 11:23:56 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
brotli HTTPLIB_REQUIRE_BROTLI
|
|
|
|
openssl HTTPLIB_REQUIRE_OPENSSL
|
|
|
|
zlib HTTPLIB_REQUIRE_ZLIB
|
|
|
|
)
|
|
|
|
|
2023-08-08 00:05:51 +08:00
|
|
|
set(VCPKG_BUILD_TYPE release) # header-only port
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-09-08 11:23:56 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DHTTPLIB_USE_OPENSSL_IF_AVAILABLE=OFF
|
|
|
|
-DHTTPLIB_USE_ZLIB_IF_AVAILABLE=OFF
|
|
|
|
-DHTTPLIB_USE_BROTLI_IF_AVAILABLE=OFF
|
2023-08-08 00:05:51 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME httplib CONFIG_PATH lib/cmake/httplib)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
|
|
|
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|