mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 14:47:49 +08:00
44 lines
1.2 KiB
CMake
44 lines
1.2 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 62897f9e794e9f16471e8a53f367268109e7fa6e # v0.10.0
|
|
SHA512 b065a1caaa29c5e7d31b89f4dc0f0a6309a58322a2c95ad784d47c9717dfb525c4f27df38ef7562e3a1be605898b30caf7702a801928f9b09c30b64f9a2becc8
|
|
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)
|