From 688cc7ebd5164a9b8d0dc2d949d4098edf6958f1 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Wed, 26 Aug 2020 11:01:33 -0700 Subject: [PATCH 1/2] Add missing include folders for example OTLP exporter --- examples/otlp/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/examples/otlp/CMakeLists.txt b/examples/otlp/CMakeLists.txt index 4c5f2bbd57..7369ecd078 100644 --- a/examples/otlp/CMakeLists.txt +++ b/examples/otlp/CMakeLists.txt @@ -1,6 +1,11 @@ -add_library(foo_library foo_library/foo_library.cc) -target_link_libraries(foo_library ${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) +include_directories(${CMAKE_BINARY_DIR}/generated/third_party/opentelemetry-proto) +include_directories(${CMAKE_SOURCE_DIR}/exporters/otlp/include) + +add_library(otlp_foo_library foo_library/foo_library.cc) +target_link_libraries(otlp_foo_library ${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) add_executable(example_otlp main.cc) -target_link_libraries(example_otlp ${CMAKE_THREAD_LIBS_INIT} foo_library - opentelemetry_trace) +target_link_libraries(example_otlp ${CMAKE_THREAD_LIBS_INIT} + otlp_foo_library + opentelemetry_trace + opentelemetry_exporter_otprotocol) From b018f6d70ed2fcf64deb0f966d1df157d273856e Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Mon, 31 Aug 2020 16:46:21 -0700 Subject: [PATCH 2/2] Format CMakeLists.txt --- examples/otlp/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/otlp/CMakeLists.txt b/examples/otlp/CMakeLists.txt index 7369ecd078..23dc75fe6d 100644 --- a/examples/otlp/CMakeLists.txt +++ b/examples/otlp/CMakeLists.txt @@ -1,11 +1,11 @@ -include_directories(${CMAKE_BINARY_DIR}/generated/third_party/opentelemetry-proto) +include_directories( + ${CMAKE_BINARY_DIR}/generated/third_party/opentelemetry-proto) include_directories(${CMAKE_SOURCE_DIR}/exporters/otlp/include) add_library(otlp_foo_library foo_library/foo_library.cc) -target_link_libraries(otlp_foo_library ${CMAKE_THREAD_LIBS_INIT} opentelemetry_api) +target_link_libraries(otlp_foo_library ${CMAKE_THREAD_LIBS_INIT} + opentelemetry_api) add_executable(example_otlp main.cc) -target_link_libraries(example_otlp ${CMAKE_THREAD_LIBS_INIT} - otlp_foo_library - opentelemetry_trace - opentelemetry_exporter_otprotocol) +target_link_libraries(example_otlp ${CMAKE_THREAD_LIBS_INIT} otlp_foo_library + opentelemetry_trace opentelemetry_exporter_otprotocol)