From: Deepika Upadhyay Date: Wed, 21 Jul 2021 16:11:37 +0000 (+0530) Subject: cmake: fix jaeger linking to ceph libraries X-Git-Tag: v17.1.0~1325^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F38783%2Fhead;p=ceph.git cmake: fix jaeger linking to ceph libraries updates: * custom target jaeger_base * target jaeger-base which encapsulates all jaeger libs * include external libraries path needed linking libraries and including opentracing and jaegertracing headers files Signed-off-by: Deepika Upadhyay --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e0ecb15b1e61..12ef955b87f1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -434,15 +434,18 @@ if(WITH_JAEGER) build_jaeger() + include_directories(${CMAKE_BINARY_DIR}/external/include) + # for testing jaeger build + add_custom_target(jaeger_base DEPENDS ${jaeger_base}) + add_library(jaeger-base INTERFACE) + add_dependencies(common-objs ${jaeger_base}) target_link_libraries(jaeger-base INTERFACE - yaml-cpp::yaml-cpp - opentracing::libopentracing - thrift::libthrift - jaegertracing::libjaegertracing) - include_directories(SYSTEM ${CMAKE_BINARY_DIR}/external/include) - #with CMake 3.12+ the following can be replaced by: - #target_link_libraries(common-objs jaeger-base) - list(APPEND jaeger_libs + yaml-cpp::yaml-cpp + opentracing::libopentracing + thrift::libthrift + jaegertracing::libjaegertracing) + + list(APPEND jaeger_libs ${CMAKE_BINARY_DIR}/external/lib/libjaegertracing.so.0 ${CMAKE_BINARY_DIR}/external/lib/libjaegertracing.so.0.6.1 ${CMAKE_BINARY_DIR}/external/lib/libopentracing.so.1.6.0) diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index d31b4c70cc59..377360f9af68 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -93,6 +93,7 @@ if(WITH_LTTNG) endif() if(WITH_JAEGER) + add_dependencies(os jaeger-base) target_link_libraries(os jaeger-base) endif()