diff --git a/cmake/opentelemetry-proto.cmake b/cmake/opentelemetry-proto.cmake index 62b2174957..0ff346d249 100644 --- a/cmake/opentelemetry-proto.cmake +++ b/cmake/opentelemetry-proto.cmake @@ -288,7 +288,9 @@ add_custom_command( ${LOGS_PROTO} ${METRICS_PROTO} ${TRACE_SERVICE_PROTO} ${LOGS_SERVICE_PROTO} ${METRICS_SERVICE_PROTO} ${PROFILES_PROTO} ${PROFILES_SERVICE_PROTO} - COMMENT "[Run]: ${PROTOBUF_RUN_PROTOC_COMMAND}") + COMMENT "[Run]: ${PROTOBUF_RUN_PROTOC_COMMAND}" + DEPENDS ${PROTOBUF_PROTOC_EXECUTABLE} + ) include_directories("${GENERATED_PROTOBUF_PATH}")