mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 11:41:36 +08:00
a2261f65ea
* opentelemetry-cpp: Update to 1.6.0 and fix abseil[cxx17] * opentelemetry-cpp: Adjust versions json * opentelemetry-cpp: Re-add 1.5.0p1 version
59 lines
2.1 KiB
CMake
59 lines
2.1 KiB
CMake
if(VCPKG_TARGET_IS_WINDOWS)
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO open-telemetry/opentelemetry-cpp
|
|
REF v1.6.0
|
|
SHA512 ae0777451a3d2d676afd9f3142ab78c7afb08474f6038bd810ff0ee30fee6695e10100c901e7ffadf3faf16c7d19622acdea414cd720be8572f7720f2d528628
|
|
HEAD_REF main
|
|
PATCHES
|
|
support_absl_cxx17.patch
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
etw WITH_ETW
|
|
zipkin WITH_ZIPKIN
|
|
prometheus WITH_PROMETHEUS
|
|
elasticsearch WITH_ELASTICSEARCH
|
|
jaeger WITH_JAEGER
|
|
otlp WITH_OTLP
|
|
zpages WITH_ZPAGES
|
|
)
|
|
|
|
# opentelemetry-proto is a third party submodule and opentelemetry-cpp release did not pack it.
|
|
if(WITH_OTLP)
|
|
set(OTEL_PROTO_VERSION "0.18.0")
|
|
vcpkg_download_distfile(ARCHIVE
|
|
URLS "https://github.com/open-telemetry/opentelemetry-proto/archive/v${OTEL_PROTO_VERSION}.tar.gz"
|
|
FILENAME "opentelemetry-proto-${OTEL_PROTO_VERSION}.tar.gz"
|
|
SHA512 5176e93ddbb92d10b5900f42bb7b98cd718488fb261ad204e73127e1bf1feb6a20cf17d5c7d4fbdd89575cef6c7fa98127a28d83e50ffba61da01a73659ddae6
|
|
)
|
|
|
|
vcpkg_extract_source_archive(src ARCHIVE "${ARCHIVE}")
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/opentelemetry-proto")
|
|
file(COPY "${src}/." DESTINATION "${SOURCE_PATH}/third_party/opentelemetry-proto")
|
|
# Create empty .git directory to prevent opentelemetry from cloning it during build time
|
|
file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/opentelemetry-proto/.git")
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBUILD_TESTING=OFF
|
|
-DWITH_EXAMPLES=OFF
|
|
-DWITH_METRICS_PREVIEW=ON
|
|
-DWITH_LOGS_PREVIEW=ON
|
|
${FEATURE_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|