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-10 02:48:25 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 d4e3d7100c3a25f2792bd4d8aef7fbc9a038025b4afe59627bbe2f3ba6eac4143729a6a81189775c43dfa7487db956245a9fbef89836f46d9ddb7650fb8c8119
|
2019-07-17 06:43:41 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2022-01-19 04:17:59 +08: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-19 04:17:59 +08:00
|
|
|
FEATURES
|
|
|
|
ssl ENABLE_SSL
|
2019-12-21 04:21:25 +08:00
|
|
|
)
|
|
|
|
|
2022-01-19 04:17:59 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-02-10 02:48:25 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2019-07-17 06:43:41 +08:00
|
|
|
)
|
|
|
|
|
2022-01-19 04:17:59 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-07-17 06:43:41 +08:00
|
|
|
|
2022-01-19 04:17:59 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT})
|
2019-07-17 06:43:41 +08:00
|
|
|
|
2023-02-10 02: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]]
|
|
|
|
[[# Generated by CMake
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(OpenSSL)]])
|
|
|
|
endif()
|
|
|
|
|
2022-01-19 04:17:59 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-07-17 06:43:41 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-02-10 02:48:25 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|