-
Notifications
You must be signed in to change notification settings - Fork 438
/
CMakeLists.txt
40 lines (38 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
include_directories(
${CMAKE_BINARY_DIR}/generated/third_party/opentelemetry-proto
${CMAKE_SOURCE_DIR}/exporters/otlp/include)
if(WITH_OTLP_GRPC)
add_executable(example_otlp_grpc grpc_main.cc)
target_link_libraries(
example_otlp_grpc ${CMAKE_THREAD_LIBS_INIT} common_foo_library
opentelemetry_trace opentelemetry_exporter_otlp_grpc gRPC::grpc++)
if(WITH_LOGS_PREVIEW)
add_executable(example_otlp_grpc_log grpc_log_main.cc)
target_link_libraries(
example_otlp_grpc_log
${CMAKE_THREAD_LIBS_INIT}
common_logs_foo_library
opentelemetry_trace
opentelemetry_logs
opentelemetry_exporter_otlp_grpc
opentelemetry_exporter_otlp_grpc_log
gRPC::grpc++)
endif()
endif()
if(WITH_OTLP_HTTP)
add_executable(example_otlp_http http_main.cc)
target_link_libraries(
example_otlp_http ${CMAKE_THREAD_LIBS_INIT} common_foo_library
opentelemetry_trace opentelemetry_exporter_otlp_http)
if(WITH_LOGS_PREVIEW)
add_executable(example_otlp_http_log http_log_main.cc)
target_link_libraries(
example_otlp_http_log
${CMAKE_THREAD_LIBS_INIT}
common_logs_foo_library
opentelemetry_trace
opentelemetry_logs
opentelemetry_exporter_otlp_http
opentelemetry_exporter_otlp_http_log)
endif()
endif()