cmake: add find_package(thrift) support for thrift 0.13

adds Findthrift.cmake which is used to find thrift 0.13, as a dependency
for building jaegertracing

* bump up submodule version for jaeger-client-cpp for thrift compiler
removal

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
This commit is contained in:
Deepika Upadhyay 2021-07-21 20:54:30 +05:30
parent 80e82686eb
commit 84ad544433
3 changed files with 34 additions and 4 deletions

View File

@ -0,0 +1,32 @@
# This module defines thrift_LIBRARIES, libraries to link thrift_INCLUDE_DIR,
# where to find thrift headers thrift_COMPILER, thrift compiler executable
# thrift_FOUND, If false, do not try to use it.
# prefer the thrift version supplied in thrift_HOME (cmake -Dthrift_HOME then
# environment)
find_path(
thrift_INCLUDE_DIR
NAMES thrift/Thrift.h
HINTS ${thrift_HOME} ENV thrift_HOME /usr/local /opt/local
PATH_SUFFIXES include)
# prefer the thrift version supplied in thrift_HOME
find_library(
thrift_LIBRARIES
NAMES thrift libthrift
HINTS ${thrift_HOME} ENV thrift_HOME /usr/local /opt/local
PATH_SUFFIXES lib lib64)
if(thrift_FOUND AND NOT (TARGET thrift::libthrift))
add_library(thrift::libthrift UNKNOWN IMPORTED)
set_target_properties(
thrift::libthrift
PROPERTIES IMPORTED_LOCATION ${thrift_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${thrift_INCLUDE_DIR})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(thrift DEFAULT_MSG thrift_LIBRARIES
thrift_INCLUDE_DIR)
mark_as_advanced(thrift_LIBRARIES thrift_INCLUDE_DIR)

View File

@ -442,9 +442,7 @@ if(WITH_JAEGER)
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
${CMAKE_BINARY_DIR}/external/lib/libopentracing.so.1.6.0
${CMAKE_BINARY_DIR}/external/lib/libthrift.so.0.13.0)
${CMAKE_BINARY_DIR}/external/lib/libopentracing.so.1.6.0)
install(FILES ${jaeger_libs}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()

@ -1 +1 @@
Subproject commit 7ad60f7330a421fe2adcab1a2d3dbf4159af6bc2
Subproject commit 95d67bf592b06beac718f6e69a76cd659bb51a6c