2018-11-15 03:16:07 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO civetweb/civetweb
|
2023-10-03 12:03:56 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 a0b943dfc76d7fd47f5a7d2c834fd38ddd4cf01a11730cf2f7cfaf32fea9698f59672f3a0f86ac80e0abc315d94d2367a500d37013f305c87d45e84cf39ca816
|
2018-11-15 03:16:07 +08:00
|
|
|
HEAD_REF master
|
2022-08-19 01:59:28 +08:00
|
|
|
PATCHES
|
|
|
|
disable_warnings.patch # cl will simply ignore the other invalid options.
|
2023-10-03 12:03:56 +08:00
|
|
|
fix-fseeko.patch
|
2018-11-15 03:16:07 +08:00
|
|
|
)
|
|
|
|
|
2020-03-28 10:58:37 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-07-21 01:24:58 +08:00
|
|
|
FEATURES
|
|
|
|
ssl CIVETWEB_ENABLE_SSL
|
2020-03-28 10:58:37 +08:00
|
|
|
)
|
|
|
|
|
2023-09-19 00:55:02 +08:00
|
|
|
# Fixes arm64-windows build. CIVETWEB_ARCHITECTURE is used only for CPack, which is not used by vcpkg
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "determine_target_architecture(CIVETWEB_ARCHITECTURE)" "")
|
|
|
|
|
2022-08-19 01:59:28 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-11-15 03:16:07 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCIVETWEB_BUILD_TESTING=OFF
|
2020-12-19 04:07:41 +08:00
|
|
|
-DCIVETWEB_ENABLE_DEBUG_TOOLS=OFF
|
2018-11-15 03:16:07 +08:00
|
|
|
-DCIVETWEB_ENABLE_ASAN=OFF
|
|
|
|
-DCIVETWEB_ENABLE_CXX=ON
|
|
|
|
-DCIVETWEB_ENABLE_IPV6=ON
|
|
|
|
-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF
|
2020-03-28 10:58:37 +08:00
|
|
|
-DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF
|
2019-07-08 14:00:33 +08:00
|
|
|
-DCIVETWEB_ENABLE_WEBSOCKETS=ON
|
2022-08-19 01:59:28 +08:00
|
|
|
-DCIVETWEB_ALLOW_WARNINGS=ON
|
2020-03-28 10:58:37 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2018-11-15 03:16:07 +08:00
|
|
|
)
|
|
|
|
|
2022-08-19 01:59:28 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-11-15 03:16:07 +08:00
|
|
|
|
2022-08-19 01:59:28 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/civetweb)
|
2018-11-15 03:16:07 +08:00
|
|
|
|
2022-08-19 01:59:28 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2023-10-03 12:03:56 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/civetweb.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/civetweb.pc")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/pkgconfig/civetweb-cpp.pc" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/civetweb-cpp.pc")
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/pkgconfig")
|
2018-11-15 03:16:07 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2022-08-19 01:59:28 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2019-07-08 14:00:33 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|