8000 [CMAKE] add generated protobuf headers to the opentelemetry_proto target by dbarker · Pull Request #3400 · open-telemetry/opentelemetry-cpp · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Increment the:
* [BUILD] Upgrade nlohmann_json to 3.12.0
[#3406](https://github.com/open-telemetry/opentelemetry-cpp/pull/3406)

* [CMAKE] Add generated protobuf headers to the opentelemetry_proto target
[#3400](https://github.com/open-telemetry/opentelemetry-cpp/pull/3400)

## [1.20 2025-04-01]

* [BUILD] Update opentelemetry-proto version
Expand Down
7 changes: 5 additions & 2 deletions cmake/opentelemetry-proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,6 @@ add_custom_command(
COMMENT "[Run]: ${PROTOBUF_RUN_PROTOC_COMMAND}"
DEPENDS ${PROTOBUF_PROTOC_EXECUTABLE})

include_directories("${GENERATED_PROTOBUF_PATH}")

unset(OTELCPP_PROTO_TARGET_OPTIONS)
if(CMAKE_SYSTEM_NAME MATCHES "Windows|MinGW|WindowsStore")
list(APPEND OTELCPP_PROTO_TARGET_OPTIONS STATIC)
Expand All @@ -315,6 +313,11 @@ add_library(
${METRICS_SERVICE_PB_CPP_FILE})
set_target_version(opentelemetry_proto)

target_include_directories(
opentelemetry_proto
PUBLIC "$<BUILD_INTERFACE:${GENERATED_PROTOBUF_PATH}>"
"$<INSTALL_INTERFACE:include>")

# Disable include-what-you-use on generated code.
set_target_properties(opentelemetry_proto PROPERTIES CXX_INCLUDE_WHAT_YOU_USE
"")
Expand Down
2 changes: 1 addition & 1 deletion third_party/nlohmann-json
Submodule nlohmann-json updated 837 files
Loading
0