CMakeLists.txt 702 B

123456789101112131415161718
  1. # Copyright The OpenTelemetry Authors
  2. # SPDX-License-Identifier: Apache-2.0
  3. add_executable(metrics_ostream_example metrics_ostream.cc)
  4. target_link_libraries(metrics_ostream_example
  5. PRIVATE common_metrics_foo_library)
  6. if(DEFINED OPENTELEMETRY_BUILD_DLL)
  7. target_compile_definitions(metrics_ostream_example
  8. PRIVATE OPENTELEMETRY_BUILD_IMPORT_DLL)
  9. target_link_libraries(metrics_ostream_example
  10. PRIVATE opentelemetry-cpp::opentelemetry_cpp)
  11. else()
  12. target_link_libraries(
  13. metrics_ostream_example PRIVATE opentelemetry-cpp::metrics
  14. opentelemetry-cpp::ostream_metrics_exporter)
  15. endif()