2021-08-19 08:14:57 +08:00
|
|
|
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
|
2023-02-08 07:31:57 +08:00
|
|
|
REF "v${VERSION}"
|
2024-07-03 01:42:35 +08:00
|
|
|
SHA512 b0e035b2b15322ba75d22d775fb77e49d5e084099924cded32ea0b1cb1ad93f22157b01a90993a8af76db07136ec72724b3d7a583ef33ff9ce3f0658005e6394
|
2021-08-19 08:14:57 +08:00
|
|
|
HEAD_REF main
|
2022-10-15 08:52:31 +08:00
|
|
|
PATCHES
|
2023-04-11 03:50:22 +08:00
|
|
|
# Missing find_dependency for Abseil
|
|
|
|
add-missing-find-dependency.patch
|
2021-08-19 08:14:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
etw WITH_ETW
|
|
|
|
zipkin WITH_ZIPKIN
|
|
|
|
prometheus WITH_PROMETHEUS
|
|
|
|
elasticsearch WITH_ELASTICSEARCH
|
2023-02-08 07:31:57 +08:00
|
|
|
otlp-http WITH_OTLP_HTTP
|
2023-04-14 05:58:46 +08:00
|
|
|
otlp-grpc WITH_OTLP_GRPC
|
2024-01-26 04:58:28 +08:00
|
|
|
geneva WITH_GENEVA
|
2024-04-10 01:13:38 +08:00
|
|
|
user-events WITH_USER_EVENTS
|
|
|
|
INVERTED_FEATURES
|
|
|
|
user-events BUILD_TRACEPOINTS
|
2021-08-19 08:14:57 +08:00
|
|
|
)
|
|
|
|
|
2021-11-06 04:00:50 +08:00
|
|
|
# opentelemetry-proto is a third party submodule and opentelemetry-cpp release did not pack it.
|
2024-02-01 08:01:42 +08:00
|
|
|
if(WITH_OTLP_GRPC OR WITH_OTLP_HTTP)
|
2024-07-11 17:29:03 +08:00
|
|
|
set(OTEL_PROTO_VERSION "1.3.1")
|
2021-11-06 04:00:50 +08:00
|
|
|
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"
|
2024-07-11 17:29:03 +08:00
|
|
|
SHA512 8c75e4ff79c4b5b251e0ec8ece92ec901d70ec601644505ffdd137fb728daac91fd9203e1f448500124906737d91d80f10b694977688c655418b94f61c828d06
|
2021-11-06 04:00:50 +08:00
|
|
|
)
|
|
|
|
|
2022-10-15 08:52:31 +08:00
|
|
|
vcpkg_extract_source_archive(src ARCHIVE "${ARCHIVE}")
|
2022-09-27 02:35:51 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/opentelemetry-proto")
|
2022-10-15 08:52:31 +08:00
|
|
|
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")
|
2023-03-29 04:35:06 +08:00
|
|
|
list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=14)
|
2024-01-06 05:57:04 +08:00
|
|
|
list(APPEND FEATURE_OPTIONS "-DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
2021-11-06 04:00:50 +08:00
|
|
|
endif()
|
|
|
|
|
2024-01-26 04:58:28 +08:00
|
|
|
set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "OFF")
|
2024-04-10 01:13:38 +08:00
|
|
|
|
|
|
|
if(WITH_GENEVA OR WITH_USER_EVENTS)
|
|
|
|
# Geneva and user events exporters from opentelemetry-cpp-contrib are tightly coupled with opentelemetry-cpp repo,
|
|
|
|
# so they should be ported as a feature under opentelemetry-cpp.
|
2024-01-26 04:58:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
|
|
|
|
REPO open-telemetry/opentelemetry-cpp-contrib
|
2024-04-10 01:13:38 +08:00
|
|
|
REF 4f3059390ad09d12d93255a10f7be8ff948d26fc
|
2024-01-26 04:58:28 +08:00
|
|
|
HEAD_REF main
|
2024-04-10 01:13:38 +08:00
|
|
|
SHA512 392e3a414ea0ee016768dd75a286d2a7a3a7a011cc0fce4ee2f796ad7e0cd70d534eb38cb1d22f91300f4670dfa212a4239ba8e008c2444d47e13c5fe3fb75c0
|
2024-01-26 04:58:28 +08:00
|
|
|
)
|
2024-04-10 01:13:38 +08:00
|
|
|
|
|
|
|
if(WITH_GENEVA)
|
|
|
|
set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "${CONTRIB_SOURCE_PATH}/exporters/geneva")
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}\;${CONTRIB_SOURCE_PATH}/exporters/geneva-trace")
|
|
|
|
else()
|
|
|
|
set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}\;${CONTRIB_SOURCE_PATH}/exporters/fluentd")
|
|
|
|
endif()
|
|
|
|
endif()
|
[opentelemetry-cpp] upgrade to release v1.14.0 (#36816)
<!-- If your PR fixes issues, please note that here by adding "Fixes
#NNNNNN." for each fixed issue on separate lines. -->
<!-- If you are still working on the PR, open it as a Draft:
https://github.blog/2019-02-14-introducing-draft-pull-requests/. -->
<!-- If this PR updates an existing port, please uncomment and fill out
this checklist:
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
END OF PORT UPDATE CHECKLIST (delete this line) -->
Upgrade to v1.14.0 release of OpenTelemetry-Cpp
https://github.com/open-telemetry/opentelemetry-cpp/releases/tag/v1.14.0.
The opentelemetry-cpp[geneva] feature was also updated to reflect the
change in v1.14.0
The port opentelemetry-fluentd depends on opentelemetry-cpp, and it is
broken on this upgrade, so it is deleted because it has been moved to
opentelemetry-cpp[geneva] in this PR.
<!-- If this PR adds a new port, please uncomment and fill out this
checklist:
- [ ] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] The name of the port matches an existing name for this component
on https://repology.org/ if possible, and/or is strongly associated with
that component on search engines.
- [ ] Optional dependencies are resolved in exactly one way. For
example, if the component is built with CMake, all `find_package` calls
are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or
disabled with
[CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html).
- [ ] The versioning scheme in `vcpkg.json` matches what upstream says.
- [ ] The license declaration in `vcpkg.json` matches what upstream
says.
- [ ] The installed as the "copyright" file matches what upstream says.
- [ ] The source code of the component installed comes from an
authoritative source.
- [ ] The generated "usage text" is accurate. See
[adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md)
for context.
- [ ] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [ ] Only one version is in the new port's versions file.
- [ ] Only one version is added to each modified port's versions file.
END OF NEW PORT CHECKLIST (delete this line) -->
2024-02-22 03:39:59 +08:00
|
|
|
|
2024-04-10 01:13:38 +08:00
|
|
|
if(WITH_USER_EVENTS)
|
|
|
|
if(WITH_GENEVA)
|
|
|
|
set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}\;${CONTRIB_SOURCE_PATH}/exporters/user_events")
|
|
|
|
else()
|
|
|
|
set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "${CONTRIB_SOURCE_PATH}/exporters/user_events")
|
|
|
|
endif()
|
[opentelemetry-cpp] upgrade to release v1.14.0 (#36816)
<!-- If your PR fixes issues, please note that here by adding "Fixes
#NNNNNN." for each fixed issue on separate lines. -->
<!-- If you are still working on the PR, open it as a Draft:
https://github.blog/2019-02-14-introducing-draft-pull-requests/. -->
<!-- If this PR updates an existing port, please uncomment and fill out
this checklist:
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
END OF PORT UPDATE CHECKLIST (delete this line) -->
Upgrade to v1.14.0 release of OpenTelemetry-Cpp
https://github.com/open-telemetry/opentelemetry-cpp/releases/tag/v1.14.0.
The opentelemetry-cpp[geneva] feature was also updated to reflect the
change in v1.14.0
The port opentelemetry-fluentd depends on opentelemetry-cpp, and it is
broken on this upgrade, so it is deleted because it has been moved to
opentelemetry-cpp[geneva] in this PR.
<!-- If this PR adds a new port, please uncomment and fill out this
checklist:
- [ ] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] The name of the port matches an existing name for this component
on https://repology.org/ if possible, and/or is strongly associated with
that component on search engines.
- [ ] Optional dependencies are resolved in exactly one way. For
example, if the component is built with CMake, all `find_package` calls
are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or
disabled with
[CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html).
- [ ] The versioning scheme in `vcpkg.json` matches what upstream says.
- [ ] The license declaration in `vcpkg.json` matches what upstream
says.
- [ ] The installed as the "copyright" file matches what upstream says.
- [ ] The source code of the component installed comes from an
authoritative source.
- [ ] The generated "usage text" is accurate. See
[adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md)
for context.
- [ ] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [ ] Only one version is in the new port's versions file.
- [ ] Only one version is added to each modified port's versions file.
END OF NEW PORT CHECKLIST (delete this line) -->
2024-02-22 03:39:59 +08:00
|
|
|
endif()
|
2024-01-26 04:58:28 +08:00
|
|
|
endif()
|
|
|
|
|
2021-08-19 08:14:57 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
|
|
|
-DWITH_EXAMPLES=OFF
|
2023-03-16 01:28:02 +08:00
|
|
|
-DOPENTELEMETRY_INSTALL=ON
|
2023-04-11 03:50:22 +08:00
|
|
|
-DWITH_ABSEIL=ON
|
2024-04-10 01:13:38 +08:00
|
|
|
-DWITH_BENCHMARK=OFF
|
[opentelemetry-cpp] upgrade to release v1.14.0 (#36816)
<!-- If your PR fixes issues, please note that here by adding "Fixes
#NNNNNN." for each fixed issue on separate lines. -->
<!-- If you are still working on the PR, open it as a Draft:
https://github.blog/2019-02-14-introducing-draft-pull-requests/. -->
<!-- If this PR updates an existing port, please uncomment and fill out
this checklist:
- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
END OF PORT UPDATE CHECKLIST (delete this line) -->
Upgrade to v1.14.0 release of OpenTelemetry-Cpp
https://github.com/open-telemetry/opentelemetry-cpp/releases/tag/v1.14.0.
The opentelemetry-cpp[geneva] feature was also updated to reflect the
change in v1.14.0
The port opentelemetry-fluentd depends on opentelemetry-cpp, and it is
broken on this upgrade, so it is deleted because it has been moved to
opentelemetry-cpp[geneva] in this PR.
<!-- If this PR adds a new port, please uncomment and fill out this
checklist:
- [ ] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] The name of the port matches an existing name for this component
on https://repology.org/ if possible, and/or is strongly associated with
that component on search engines.
- [ ] Optional dependencies are resolved in exactly one way. For
example, if the component is built with CMake, all `find_package` calls
are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or
disabled with
[CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html).
- [ ] The versioning scheme in `vcpkg.json` matches what upstream says.
- [ ] The license declaration in `vcpkg.json` matches what upstream
says.
- [ ] The installed as the "copyright" file matches what upstream says.
- [ ] The source code of the component installed comes from an
authoritative source.
- [ ] The generated "usage text" is accurate. See
[adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md)
for context.
- [ ] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [ ] Only one version is in the new port's versions file.
- [ ] Only one version is added to each modified port's versions file.
END OF NEW PORT CHECKLIST (delete this line) -->
2024-02-22 03:39:59 +08:00
|
|
|
-DOPENTELEMETRY_EXTERNAL_COMPONENT_PATH=${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}
|
2021-08-19 08:14:57 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2023-04-14 05:58:46 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
2024-01-26 04:58:28 +08:00
|
|
|
WITH_GENEVA
|
2024-04-10 01:13:38 +08:00
|
|
|
WITH_USER_EVENTS
|
|
|
|
BUILD_TRACEPOINTS
|
2021-08-19 08:14:57 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
2024-01-06 05:57:04 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
2021-08-19 08:14:57 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2023-04-14 05:58:46 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|