mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 14:59:03 +08:00
6fbb26ecdb
Update prometheus-cpp to `0.12.2`. Locally tested all the features on macOS.
43 lines
1.2 KiB
CMake
43 lines
1.2 KiB
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO jupp0r/prometheus-cpp
|
|
REF 84388828ae80556f57e11249dbd0063043991fb4 # v0.12.3
|
|
SHA512 3d8c42b7fa15b5ccc5684a590cadb09cc9adf76a66f3fa0f8b791d9ee1f1442687c554215a21ff932b62d7aac8a6e5dd6e581d2de4faae3aa9ab02e73a60533f
|
|
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)
|
|
feature(tests ENABLE_TESTING)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS
|
|
-DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages
|
|
-DGENERATE_PKGCONFIG=OFF
|
|
${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/${PORT}/copyright COPYONLY)
|