Skip to content

Commit

Permalink
[Geneva] add interface target for geneva-trace (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Jan 30, 2024
1 parent 1f3b11e commit 26e5ed4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions exporters/geneva-trace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,28 @@ if(MAIN_PROJECT)
option(WITH_EXAMPLES "Build examples" ON)
endif()

add_library(opentelemetry-cpp-geneva-trace-log-exporter INTERFACE)
target_include_directories(
opentelemetry-cpp-geneva-trace-log-exporter INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)

if(WITH_EXAMPLES)
include_directories(include)
add_subdirectory(example)
endif()

if(OPENTELEMETRY_INSTALL)
install(DIRECTORY include/ DESTINATION include)

install(
TARGETS opentelemetry-cpp-geneva-trace-log-exporter
EXPORT "${PROJECT_NAME}-target")

if(NOT MAIN_PROJECT)
install(
EXPORT "${PROJECT_NAME}-target"
NAMESPACE "${PROJECT_NAME}::"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()
endif()

0 comments on commit 26e5ed4

Please sign in to comment.