summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/ext/CMakeLists.txt
blob: 034328eaa574b2391da3bd1c9a6bcaf38b40f336 (plain)
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
add_library(opentelemetry_ext INTERFACE)
target_include_directories(
  opentelemetry_ext
  INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
            "$<INSTALL_INTERFACE:include>")

set_target_properties(opentelemetry_ext PROPERTIES EXPORT_NAME "ext")
target_link_libraries(opentelemetry_ext INTERFACE opentelemetry_api)

install(
  TARGETS opentelemetry_ext
  EXPORT "${PROJECT_NAME}-target"
  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(
  DIRECTORY include/opentelemetry/ext
  DESTINATION include/opentelemetry/
  FILES_MATCHING
  PATTERN "*.h")

add_subdirectory(src)

if(BUILD_TESTING)
  add_subdirectory(test)
endif()