Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metrics SDK] Change Prometheus CMake target name #1765

Merged
merged 3 commits into from
Nov 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions exporters/prometheus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ if(NOT TARGET prometheus-cpp::core)
find_package(prometheus-cpp CONFIG REQUIRED)
endif()

add_library(prometheus_exporter src/exporter.cc src/collector.cc
src/exporter_utils.cc)
add_library(opentelemetry_exporter_prometheus src/exporter.cc src/collector.cc
src/exporter_utils.cc)
target_include_directories(
prometheus_exporter
opetelemetry_exporter_prometheus
marcalff marked this conversation as resolved.
Show resolved Hide resolved
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
"$<INSTALL_INTERFACE:include>")

set(PROMETHEUS_EXPORTER_TARGETS prometheus_exporter)
set(PROMETHEUS_EXPORTER_TARGETS opetelemetry_exporter_prometheus)
marcalff marked this conversation as resolved.
Show resolved Hide resolved
if(TARGET pull)
list(APPEND PROMETHEUS_EXPORTER_TARGETS pull)
endif()
if(TARGET core)
list(APPEND PROMETHEUS_EXPORTER_TARGETS core)
endif()
target_link_libraries(
prometheus_exporter PUBLIC opentelemetry_metrics prometheus-cpp::pull
prometheus-cpp::core)
opetelemetry_exporter_prometheus
marcalff marked this conversation as resolved.
Show resolved Hide resolved
PUBLIC opentelemetry_metrics prometheus-cpp::pull prometheus-cpp::core)
install(
TARGETS ${PROMETHEUS_EXPORTER_TARGETS}
EXPORT "${PROJECT_NAME}-target"
Expand Down