diff options
Diffstat (limited to 'vcpkg/ports/prometheus-cpp')
| -rw-r--r-- | vcpkg/ports/prometheus-cpp/portfile.cmake | 37 | ||||
| -rw-r--r-- | vcpkg/ports/prometheus-cpp/vcpkg.json | 46 |
2 files changed, 83 insertions, 0 deletions
diff --git a/vcpkg/ports/prometheus-cpp/portfile.cmake b/vcpkg/ports/prometheus-cpp/portfile.cmake new file mode 100644 index 0000000..78d4114 --- /dev/null +++ b/vcpkg/ports/prometheus-cpp/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jupp0r/prometheus-cpp + REF "v${VERSION}" + SHA512 e397f25c7a62d410d19be5e926cfb38175c89755e4ff9d67f06b905036daa82b0dfbe21fcc69438fc1c1e5d04f120ef7ff983ca9411ab198a3911992efb00093 + HEAD_REF master +) + +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}" + OPTIONS + -DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages + -DGENERATE_PKGCONFIG=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +vcpkg_copy_pdbs() + +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/prometheus-cpp") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Handle copyright +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/vcpkg/ports/prometheus-cpp/vcpkg.json b/vcpkg/ports/prometheus-cpp/vcpkg.json new file mode 100644 index 0000000..763137f --- /dev/null +++ b/vcpkg/ports/prometheus-cpp/vcpkg.json @@ -0,0 +1,46 @@ +{ + "name": "prometheus-cpp", + "version-semver": "1.3.0", + "description": "Prometheus Client Library for Modern C++", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "compression", + "pull" + ], + "features": { + "compression": { + "description": "Enable zlib compression", + "dependencies": [ + "zlib" + ] + }, + "pull": { + "description": "Support for regular pull mode", + "dependencies": [ + "civetweb" + ] + }, + "push": { + "description": "Support push gateway", + "dependencies": [ + "curl" + ] + }, + "tests": { + "description": "Additional testing support", + "dependencies": [ + "gtest" + ] + } + } +} |