Skip to content

Commit

Permalink
rename jaeger exporter target (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Jul 22, 2021
1 parent db8289f commit 950f940
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/jaeger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ target_link_libraries(jaeger_foo_library ${CMAKE_THREAD_LIBS_INIT}
add_executable(example_jaeger main.cc)
target_link_libraries(
example_jaeger ${CMAKE_THREAD_LIBS_INIT} jaeger_foo_library
opentelemetry_trace jaeger_trace_exporter)
opentelemetry_trace opentelemetry_exporter_jaeger_trace)
25 changes: 14 additions & 11 deletions exporters/jaeger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,34 @@ set(JAEGER_EXPORTER_SOURCES
src/jaeger_exporter.cc src/thrift_sender.cc src/udp_transport.cc
src/recordable.cc src/TUDPTransport.cc)

add_library(jaeger_trace_exporter ${JAEGER_EXPORTER_SOURCES}
${JAEGER_THRIFT_GENCPP_SOURCES})
add_library(opentelemetry_exporter_jaeger_trace ${JAEGER_EXPORTER_SOURCES}
${JAEGER_THRIFT_GENCPP_SOURCES})

set_target_properties(jaeger_trace_exporter PROPERTIES EXPORT_NAME
jaeger_trace_exporter)
set_target_properties(
opentelemetry_exporter_jaeger_trace
PROPERTIES EXPORT_NAME opentelemetry_exporter_jaeger_trace)

target_include_directories(
jaeger_trace_exporter
opentelemetry_exporter_jaeger_trace
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
"$<INSTALL_INTERFACE:include>")

target_link_libraries(
jaeger_trace_exporter
opentelemetry_exporter_jaeger_trace
PUBLIC opentelemetry_resources
PRIVATE thrift::thrift)

if(MSVC)
target_compile_definitions(jaeger_trace_exporter PUBLIC NOMINMAX)
target_compile_definitions(opentelemetry_exporter_jaeger_trace
PUBLIC NOMINMAX)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(jaeger_trace_exporter
target_compile_definitions(opentelemetry_exporter_jaeger_trace
PUBLIC THRIFT_STATIC_DEFINE)
endif()
endif()

install(
TARGETS jaeger_trace_exporter
TARGETS opentelemetry_exporter_jaeger_trace
EXPORT "${PROJECT_NAME}-target"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand All @@ -52,8 +54,9 @@ install(

if(BUILD_TESTING)
add_executable(jaeger_recordable_test test/jaeger_recordable_test.cc)
target_link_libraries(jaeger_recordable_test ${GTEST_BOTH_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT} jaeger_trace_exporter)
target_link_libraries(
jaeger_recordable_test ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
opentelemetry_exporter_jaeger_trace)

gtest_add_tests(
TARGET jaeger_recordable_test
Expand Down

0 comments on commit 950f940

Please sign in to comment.