2018-11-15 03:16:07 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO jupp0r/prometheus-cpp
|
2024-03-27 02:49:40 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 8c15492054189b736e502258c30aaaae0fac3c9ea61907260e6e3cd29fe4077451f9e49fd580508aa6e21691209545d9cf87011be5b046fa097a53a133167553
|
2018-11-15 03:16:07 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-11-19 12:19:38 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
compression ENABLE_COMPRESSION
|
|
|
|
pull ENABLE_PULL
|
|
|
|
push ENABLE_PUSH
|
|
|
|
tests ENABLE_TESTING
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-11-15 03:16:07 +08:00
|
|
|
OPTIONS
|
|
|
|
-DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages
|
2021-03-16 02:29:47 +08:00
|
|
|
-DGENERATE_PKGCONFIG=OFF
|
2018-11-15 03:16:07 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
2021-11-19 12:19:38 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-11-15 03:16:07 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-11-19 12:19:38 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/prometheus-cpp")
|
2018-11-15 03:16:07 +08:00
|
|
|
|
2021-11-19 12:19:38 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2018-11-15 03:16:07 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2021-11-19 12:19:38 +08:00
|
|
|
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
|