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
|
2020-10-07 05:57:37 +08:00
|
|
|
REF 62897f9e794e9f16471e8a53f367268109e7fa6e # v0.10.0
|
|
|
|
SHA512 b065a1caaa29c5e7d31b89f4dc0f0a6309a58322a2c95ad784d47c9717dfb525c4f27df38ef7562e3a1be605898b30caf7702a801928f9b09c30b64f9a2becc8
|
2018-11-15 03:16:07 +08:00
|
|
|
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)
|
2019-06-13 07:52:52 +08:00
|
|
|
feature(tests ENABLE_TESTING)
|
2018-11-15 03:16:07 +08:00
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages
|
|
|
|
${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)
|