Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -46,6 +46,9 @@ Increment the:
[#3320](https://github.com/open-telemetry/opentelemetry-cpp/pull/3220)
[#3368](https://github.com/open-telemetry/opentelemetry-cpp/pull/3368)

* [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
Loading