mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 13:49:07 +08:00
72657582cf
* [prometheus-cpp] Update to version 0.7.0 * [prometheus-cpp] add a testing feature
44 lines
1.1 KiB
CMake
44 lines
1.1 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO jupp0r/prometheus-cpp
|
|
REF v0.7.0
|
|
SHA512 ff946585e24d84596e851f838b42566512fe368f164254d309b2aa3bda770c5442b6eeb880055351f89e0e2d0b581fddb5b0e70dd5b2a15370e508c4aabbcb1c
|
|
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
|
|
${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)
|