]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: build blkin instead of using find_package
authorCasey Bodley <cbodley@redhat.com>
Wed, 17 Aug 2016 18:15:14 +0000 (14:15 -0400)
committerSage Weil <sage@redhat.com>
Fri, 5 May 2017 18:05:24 +0000 (14:05 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
CMakeLists.txt
cmake/modules/Findblkin.cmake [deleted file]
src/CMakeLists.txt

index 6ce98f65c531509ce5f51c8c1e8a0515ce069bc6..e33cf17744dda4538d559c5526c4b3057a58aeab 100644 (file)
@@ -339,8 +339,8 @@ endif(WITH_DPDK)
 
 option(WITH_BLKIN "Use blkin to emit LTTng tracepoints for Zipkin" OFF)
 if(WITH_BLKIN)
-  find_package(blkin REQUIRED)
-  include_directories(${BLKIN_INCLUDE_DIR})
+  set(BLKIN_LIBRARIES blkin lttng-ust)
+  include_directories(src/blkin/blkin-lib)
 endif(WITH_BLKIN)
 
 #option for RGW
diff --git a/cmake/modules/Findblkin.cmake b/cmake/modules/Findblkin.cmake
deleted file mode 100644 (file)
index cfa697b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# - Try to find blkin
-# Once done this will define
-#  BLKIN_FOUND - System has blkin
-#  BLKIN_INCLUDE_DIR - The blkin include directories
-#  BLKIN_LIBRARIES - The libraries needed to use blkin
-
-find_package(PkgConfig)
-pkg_check_modules(PC_BLKIN QUIET libblkin)
-
-find_path(BLKIN_INCLUDE_DIR ztracer.hpp
-       HINTS ${PC_BLKIN_INCLUDEDIR} ${PC_BLKIN_INCLUDE_DIRS}
-       PATH_SUFFIXES blkin)
-find_library(BLKIN_LIBRARY NAMES blkin
-       HINTS ${PC_BLKIN_LIBDIR} ${PC_BLKIN_LIBRARY_DIRS})
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set BLKIN_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(blkin DEFAULT_MSG
-       BLKIN_LIBRARY BLKIN_INCLUDE_DIR)
-
-set(BLKIN_LIBRARIES ${BLKIN_LIBRARY} lttng-ust)
-mark_as_advanced(BLKIN_INCLUDE_DIR BLKIN_LIBRARIES)
index 152e22a74993479d0a1eee07072fbe1fc2b1e303..25fe953badd294e9a92914df40a83aa99ae08f4d 100644 (file)
@@ -286,6 +286,10 @@ endif()
 set(heap_profiler_files ${TCMALLOC_srcs})
 add_library(heap_profiler_objs OBJECT ${heap_profiler_files})
 
+if (WITH_BLKIN)
+  add_subdirectory(blkin/blkin-lib)
+endif(WITH_BLKIN)
+
 # Common infrastructure
 configure_file(
   ${CMAKE_SOURCE_DIR}/src/ceph_ver.h.in.cmake