aboutsummaryrefslogtreecommitdiff
path: root/ports/prometheus-cpp
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-02-28 14:36:23 -0800
committerPhil Christensen <philc@microsoft.com>2019-02-28 14:36:23 -0800
commit773c8267dfb506f41c204f61042f30b6143a8095 (patch)
tree5946d1526c3ad77a2df80786a1370d96389d931b /ports/prometheus-cpp
parent6afbceb27fd2aa39c66f810a22f5d4ad97575110 (diff)
parent7859944528be28bee1fda9f325b78d6a7f02124e (diff)
downloadvcpkg-773c8267dfb506f41c204f61042f30b6143a8095.tar.gz
vcpkg-773c8267dfb506f41c204f61042f30b6143a8095.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4564
Diffstat (limited to 'ports/prometheus-cpp')
-rw-r--r--ports/prometheus-cpp/CONTROL16
-rw-r--r--ports/prometheus-cpp/portfile.cmake43
2 files changed, 59 insertions, 0 deletions
diff --git a/ports/prometheus-cpp/CONTROL b/ports/prometheus-cpp/CONTROL
new file mode 100644
index 000000000..e89b84cb2
--- /dev/null
+++ b/ports/prometheus-cpp/CONTROL
@@ -0,0 +1,16 @@
+Source: prometheus-cpp
+Version: 0.6.0
+Description: Prometheus Client Library for Modern C++
+Default-Features: compression, pull
+
+Feature: compression
+Build-Depends: zlib
+Description: Enable zlib compression
+
+Feature: pull
+Build-Depends: civetweb
+Description: Support for regular pull mode
+
+Feature: push
+Build-Depends: curl
+Description: Support push gateway
diff --git a/ports/prometheus-cpp/portfile.cmake b/ports/prometheus-cpp/portfile.cmake
new file mode 100644
index 000000000..388623d48
--- /dev/null
+++ b/ports/prometheus-cpp/portfile.cmake
@@ -0,0 +1,43 @@
+include(vcpkg_common_functions)
+
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO jupp0r/prometheus-cpp
+ REF v0.6.0
+ SHA512 a7e6f902f3007007ec68add5ac63e833c6f383ed0ce103e238b7248497f495e664446df7801000e36021adcb7cfb1d461bbb45e1b4fba9ffa4edfcaf5b5957dd
+ HEAD_REF master
+)
+
+macro(feature FEATURENAME OPTIONNAME)
+ if("${FEATURENAME}" IN_LIST FEATURES)
+ list(APPEND FEATURE_OPTIONS -D${OPTIONNAME}=TRUE)
+ else()
+ list(APPEND FEATURE_OPTIONS -D${OPTIONNAME}=FALSE)
+ endif()
+endmacro()
+
+feature(compression ENABLE_COMPRESSION)
+feature(pull ENABLE_PULL)
+feature(push ENABLE_PUSH)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages
+ -DENABLE_TESTING=FALSE # need gtest 1.8.1
+ ${FEATURE_OPTIONS}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(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/prometheus-cpp/copyright COPYONLY)