mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-13 16:59:02 +08:00
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 342de5e93bd0cbafde77ec801f9dd35a03bceb3f # v0.13.0
|
|
SHA512 2edd093dff57109f4e7050f7d870010e696642f0445a8d50f689a9a7e8f4704e74659846c1afcdfcd700ceeb64b48ea83159e87ca00ca58de4866dd39975590b
|
|
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)
|