diff options
| author | Sergii Baitala <sbaitala@imprivata.com> | 2021-08-19 03:14:57 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-18 17:14:57 -0700 |
| commit | bfc992771e2d1268546739d524a8d9bc4b67b967 (patch) | |
| tree | 2516735ff6bf12525bfb2b8ec2a0ab70d99a63b0 | |
| parent | 322e3e152a8310f7842c8f568dd3747017a93e48 (diff) | |
| download | vcpkg-bfc992771e2d1268546739d524a8d9bc4b67b967.tar.gz vcpkg-bfc992771e2d1268546739d524a8d9bc4b67b967.zip | |
[opentelemetry-cpp] New port (#19536)
* add openteletry-cpp
* update vcpkg
* Apply suggestions from code review
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
* update version
* check etw for linux/osx
* Remove otlp feature
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
| -rw-r--r-- | ports/opentelemetry-cpp/portfile.cmake | 42 | ||||
| -rw-r--r-- | ports/opentelemetry-cpp/vcpkg.json | 46 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/o-/opentelemetry-cpp.json | 9 |
4 files changed, 101 insertions, 0 deletions
diff --git a/ports/opentelemetry-cpp/portfile.cmake b/ports/opentelemetry-cpp/portfile.cmake new file mode 100644 index 000000000..63ccb500b --- /dev/null +++ b/ports/opentelemetry-cpp/portfile.cmake @@ -0,0 +1,42 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +if ("etw" IN_LIST FEATURES) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "linux" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "OSX") + message(FATAL_ERROR "Feature 'ewt' does not support 'linux & osx'") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-telemetry/opentelemetry-cpp + REF v1.0.0-rc4 + SHA512 93de3e61b6bd0a9237cf81dedbcdb078fb92c1dc562975c82134d791ad911d4d3c0e717f390a0a993fbeda5d5c90206c0e7a0c7085e58d9cfefbc9fd4ff209d2 + HEAD_REF main +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + etw WITH_ETW + zipkin WITH_ZIPKIN + prometheus WITH_PROMETHEUS + elasticsearch WITH_ELASTICSEARCH + jaeger WITH_JAEGER +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DWITH_EXAMPLES=OFF + ${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) diff --git a/ports/opentelemetry-cpp/vcpkg.json b/ports/opentelemetry-cpp/vcpkg.json new file mode 100644 index 000000000..d8d6a0dd3 --- /dev/null +++ b/ports/opentelemetry-cpp/vcpkg.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "opentelemetry-cpp", + "version-semver": "1.0.0-rc4", + "description": [ + "OpenTelemetry is a collection of tools, APIs, and SDKs.", + "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-cpp", + "supports": "!(windows & !static)", + "dependencies": [ + "curl", + "nlohmann-json", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "elasticsearch": { + "description": "Whether to include the Elasticsearch Client in the SDK" + }, + "etw": { + "description": "Whether to include the ETW Exporter in the SDK" + }, + "jaeger": { + "description": "Whether to include the Jaeger exporter", + "dependencies": [ + "thrift" + ] + }, + "prometheus": { + "description": "Whether to include the Prometheus Client in the SDK", + "dependencies": [ + "prometheus-cpp" + ] + }, + "zipkin": { + "description": "Whether to include the Zipkin exporter in the SDK" + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 6aeb14c61..c2c74e2af 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4712,6 +4712,10 @@ "baseline": "3.4.3", "port-version": 2 }, + "opentelemetry-cpp": { + "baseline": "1.0.0-rc4", + "port-version": 0 + }, "opentracing": { "baseline": "1.6.0", "port-version": 1 diff --git a/versions/o-/opentelemetry-cpp.json b/versions/o-/opentelemetry-cpp.json new file mode 100644 index 000000000..daf0f0edf --- /dev/null +++ b/versions/o-/opentelemetry-cpp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "987820e81233d904abda334100303e2d11469499", + "version-semver": "1.0.0-rc4", + "port-version": 0 + } + ] +} |
