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

Rename http_client_curl to opentelemetry_http_client_curl #1301

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 5 additions & 4 deletions examples/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ else()
add_executable(http_server server.cc)

target_link_libraries(
http_client ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace http_client_curl
opentelemetry_exporter_ostream_span ${CURL_LIBRARIES})
http_client ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span
${CURL_LIBRARIES})

target_link_libraries(
http_server ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace http_client_curl
opentelemetry_exporter_ostream_span)
http_server ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span)
endif()
2 changes: 1 addition & 1 deletion exporters/elasticsearch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target_include_directories(

target_link_libraries(
opentelemetry_exporter_elasticsearch_logs
PUBLIC opentelemetry_trace opentelemetry_logs http_client_curl)
PUBLIC opentelemetry_trace opentelemetry_logs opentelemetry_http_client_curl)

install(
TARGETS opentelemetry_exporter_elasticsearch_logs
Expand Down
2 changes: 1 addition & 1 deletion exporters/jaeger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ target_include_directories(

target_link_libraries(
opentelemetry_exporter_jaeger_trace
PUBLIC opentelemetry_resources http_client_curl
PUBLIC opentelemetry_resources opentelemetry_http_client_curl
PRIVATE thrift::thrift)

if(MSVC)
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if(WITH_OTLP_HTTP)
PROPERTIES EXPORT_NAME otlp_http_client)
target_link_libraries(
opentelemetry_exporter_otlp_http_client
PUBLIC opentelemetry_sdk opentelemetry_proto http_client_curl
PUBLIC opentelemetry_sdk opentelemetry_proto opentelemetry_http_client_curl
nlohmann_json::nlohmann_json)
if(nlohmann_json_clone)
add_dependencies(opentelemetry_exporter_otlp_http_client
Expand Down
3 changes: 2 additions & 1 deletion exporters/zipkin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ add_library(opentelemetry_exporter_zipkin_trace src/zipkin_exporter.cc

target_link_libraries(
opentelemetry_exporter_zipkin_trace
PUBLIC opentelemetry_trace http_client_curl nlohmann_json::nlohmann_json)
PUBLIC opentelemetry_trace opentelemetry_http_client_curl
nlohmann_json::nlohmann_json)

install(
TARGETS opentelemetry_exporter_zipkin_trace
Expand Down
19 changes: 10 additions & 9 deletions ext/src/http/client/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
find_package(CURL)
if(CURL_FOUND)
add_library(http_client_curl http_client_factory_curl.cc http_client_curl.cc)
add_library(opentelemetry_http_client_curl http_client_factory_curl.cc
http_client_curl.cc)

set_target_properties(http_client_curl PROPERTIES EXPORT_NAME
http_client_curl)
set_target_properties(opentelemetry_http_client_curl
PROPERTIES EXPORT_NAME http_client_curl)

if(TARGET CURL::libcurl)
target_link_libraries(http_client_curl PUBLIC opentelemetry_ext
CURL::libcurl)
target_link_libraries(opentelemetry_http_client_curl
PUBLIC opentelemetry_ext CURL::libcurl)
else()
target_include_directories(http_client_curl
target_include_directories(opentelemetry_http_client_curl
INTERFACE "${CURL_INCLUDE_DIRS}")
target_link_libraries(http_client_curl PUBLIC opentelemetry_ext
${CURL_LIBRARIES})
target_link_libraries(opentelemetry_http_client_curl
PUBLIC opentelemetry_ext ${CURL_LIBRARIES})
endif()

install(
TARGETS http_client_curl
TARGETS opentelemetry_http_client_curl
EXPORT "${PROJECT_NAME}-target"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
6 changes: 4 additions & 2 deletions ext/test/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ if(CURL_FOUND)
${CMAKE_THREAD_LIBS_INIT})

if(TARGET CURL::libcurl)
target_link_libraries(${FILENAME} CURL::libcurl http_client_curl)
target_link_libraries(${FILENAME} opentelemetry_http_client_curl
CURL::libcurl)
else()
include_directories(${CURL_INCLUDE_DIRS})
target_link_libraries(${FILENAME} ${CURL_LIBRARIES} http_client_curl)
target_link_libraries(${FILENAME} ${CURL_LIBRARIES}
opentelemetry_http_client_curl)
endif()
gtest_add_tests(
TARGET ${FILENAME}
Expand Down
6 changes: 3 additions & 3 deletions ext/test/w3c_tracecontext_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ else()
add_executable(w3c_tracecontext_test main.cc)
target_link_libraries(
w3c_tracecontext_test
PRIVATE ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace http_client_curl
opentelemetry_exporter_ostream_span ${CURL_LIBRARIES}
nlohmann_json::nlohmann_json)
PRIVATE ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace
opentelemetry_http_client_curl opentelemetry_exporter_ostream_span
${CURL_LIBRARIES} nlohmann_json::nlohmann_json)
if(nlohmann_json_clone)
add_dependencies(w3c_tracecontext_test nlohmann_json::nlohmann_json)
endif()
Expand Down