2019-07-17 06:43:41 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO cesanta/mongoose
|
2023-02-09 10:48:25 -08:00
|
|
|
REF "${VERSION}"
|
2024-11-23 00:19:44 +01:00
|
|
|
SHA512 d17ebb61d60fd8ab606c6b107d17f4f3942c1f1d0eab7987cc66778e9b345395577dc5a5beb3e061ff8282de75d6104a3aa7bd88c513ba2b1fc1f4e0594e8a3c
|
2019-07-17 06:43:41 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2022-01-18 21:17:59 +01:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2019-07-17 06:43:41 +08:00
|
|
|
|
2019-12-21 04:21:25 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2022-01-18 21:17:59 +01:00
|
|
|
FEATURES
|
|
|
|
ssl ENABLE_SSL
|
2019-12-21 04:21:25 +08:00
|
|
|
)
|
|
|
|
|
2022-01-18 21:17:59 +01:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-02-09 10:48:25 -08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2019-07-17 06:43:41 +08:00
|
|
|
)
|
|
|
|
|
2022-01-18 21:17:59 +01:00
|
|
|
vcpkg_cmake_install()
|
2019-07-17 06:43:41 +08:00
|
|
|
|
2022-01-18 21:17:59 +01:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT})
|
2019-07-17 06:43:41 +08:00
|
|
|
|
2023-02-09 10:48:25 -08:00
|
|
|
if("ssl" IN_LIST FEATURES)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-${PORT}-config.cmake"
|
|
|
|
[[# Generated by CMake]]
|
2023-08-02 17:57:50 +02:00
|
|
|
[[# Generated by CMake
|
2023-02-09 10:48:25 -08:00
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(OpenSSL)]])
|
|
|
|
endif()
|
|
|
|
|
2022-01-18 21:17:59 +01:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-07-17 06:43:41 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-02-09 10:48:25 -08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|