From 07c80bc0b278c69094f3465ca7fc534fe1076d9a Mon Sep 17 00:00:00 2001 From: owent Date: Thu, 31 Mar 2022 19:30:52 +0800 Subject: [PATCH] Rename `http_client_curl` to `opentelemetry_http_client_curl` Signed-off-by: owent --- examples/http/CMakeLists.txt | 9 +++++---- exporters/elasticsearch/CMakeLists.txt | 2 +- exporters/jaeger/CMakeLists.txt | 2 +- exporters/otlp/CMakeLists.txt | 2 +- exporters/zipkin/CMakeLists.txt | 3 ++- ext/src/http/client/curl/CMakeLists.txt | 19 ++++++++++--------- ext/test/http/CMakeLists.txt | 6 ++++-- ext/test/w3c_tracecontext_test/CMakeLists.txt | 6 +++--- 8 files changed, 27 insertions(+), 22 deletions(-) diff --git a/examples/http/CMakeLists.txt b/examples/http/CMakeLists.txt index 2eddcfe03f..a1181c93a4 100644 --- a/examples/http/CMakeLists.txt +++ b/examples/http/CMakeLists.txt @@ -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() diff --git a/exporters/elasticsearch/CMakeLists.txt b/exporters/elasticsearch/CMakeLists.txt index 1538a6f44a..9b2833854e 100644 --- a/exporters/elasticsearch/CMakeLists.txt +++ b/exporters/elasticsearch/CMakeLists.txt @@ -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 diff --git a/exporters/jaeger/CMakeLists.txt b/exporters/jaeger/CMakeLists.txt index 0659c399b0..6d3d8b88fb 100644 --- a/exporters/jaeger/CMakeLists.txt +++ b/exporters/jaeger/CMakeLists.txt @@ -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) diff --git a/exporters/otlp/CMakeLists.txt b/exporters/otlp/CMakeLists.txt index 0332267922..1dba7ea1c7 100755 --- a/exporters/otlp/CMakeLists.txt +++ b/exporters/otlp/CMakeLists.txt @@ -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 diff --git a/exporters/zipkin/CMakeLists.txt b/exporters/zipkin/CMakeLists.txt index b9591324fd..b82339f1ee 100644 --- a/exporters/zipkin/CMakeLists.txt +++ b/exporters/zipkin/CMakeLists.txt @@ -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 diff --git a/ext/src/http/client/curl/CMakeLists.txt b/ext/src/http/client/curl/CMakeLists.txt index 64486b96db..78a81cfe3e 100644 --- a/ext/src/http/client/curl/CMakeLists.txt +++ b/ext/src/http/client/curl/CMakeLists.txt @@ -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} diff --git a/ext/test/http/CMakeLists.txt b/ext/test/http/CMakeLists.txt index 13b7c8206e..341648085d 100644 --- a/ext/test/http/CMakeLists.txt +++ b/ext/test/http/CMakeLists.txt @@ -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} diff --git a/ext/test/w3c_tracecontext_test/CMakeLists.txt b/ext/test/w3c_tracecontext_test/CMakeLists.txt index 30e2f5d0f3..ea74a8eeb0 100644 --- a/ext/test/w3c_tracecontext_test/CMakeLists.txt +++ b/ext/test/w3c_tracecontext_test/CMakeLists.txt @@ -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()