Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Nov 11, 2022
1 parent 4c3408d commit dea7668
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/prometheus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ include_directories(${CMAKE_SOURCE_DIR}/exporters/prometheus/include)
add_executable(prometheus_example main.cc)
target_link_libraries(
prometheus_example ${CMAKE_THREAD_LIBS_INIT} opentelemetry_metrics
prometheus_exporter opentelemetry_resources common_metrics_foo_library)
opentelemetry_exporter_prometheus opentelemetry_resources common_metrics_foo_library)
6 changes: 3 additions & 3 deletions exporters/prometheus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ endif()
add_library(opentelemetry_exporter_prometheus src/exporter.cc src/collector.cc
src/exporter_utils.cc)
target_include_directories(
opetelemetry_exporter_prometheus
opentelemetry_exporter_prometheus
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
"$<INSTALL_INTERFACE:include>")

set(PROMETHEUS_EXPORTER_TARGETS opetelemetry_exporter_prometheus)
set(PROMETHEUS_EXPORTER_TARGETS opentelemetry_exporter_prometheus)
if(TARGET pull)
list(APPEND PROMETHEUS_EXPORTER_TARGETS pull)
endif()
if(TARGET core)
list(APPEND PROMETHEUS_EXPORTER_TARGETS core)
endif()
target_link_libraries(
opetelemetry_exporter_prometheus
opentelemetry_exporter_prometheus
PUBLIC opentelemetry_metrics prometheus-cpp::pull prometheus-cpp::core)
install(
TARGETS ${PROMETHEUS_EXPORTER_TARGETS}
Expand Down
2 changes: 1 addition & 1 deletion exporters/prometheus/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ foreach(testname exporter_test collector_test exporter_utils_test)
add_executable(${testname} "${testname}.cc")
target_link_libraries(
${testname} ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
prometheus_exporter prometheus-cpp::pull opentelemetry_resources)
opentelemetry_exporter_prometheus prometheus-cpp::pull opentelemetry_resources)
gtest_add_tests(
TARGET ${testname}
TEST_PREFIX exporter.
Expand Down

0 comments on commit dea7668

Please sign in to comment.