mirror of
https://github.com/ceph/ceph
synced 2025-02-17 16:07:37 +00:00
cmake: find keyutils if rbd or libcephfs is enabled
* find_package(keyutils REQUIRED) if (WITH_LIBCEPHFS OR WITH_RBD) prior to this change, we detect keyutils if the building platform is not FreeBSD, we should instead check the WITH_* options, and let the maintainer to decided what is the best for his/her platform, and error out if the building host cannot fulfill the requirement to build the asserts. * build krbd.cc if (WITH_RBD) Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
66953e3224
commit
b805505d25
@ -285,10 +285,9 @@ else(ALLOCATOR)
|
||||
endif(GPERFTOOLS_FOUND)
|
||||
endif(ALLOCATOR)
|
||||
|
||||
if(NOT FREEBSD)
|
||||
# XXX keyutils is available, but not yet recognised
|
||||
if(WITH_LIBCEPHFS OR WITH_RBD)
|
||||
find_package(keyutils REQUIRED)
|
||||
endif(NOT FREEBSD)
|
||||
endif()
|
||||
|
||||
find_package(CURL REQUIRED)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
|
||||
|
@ -628,19 +628,15 @@ if(${WITH_RADOSGW})
|
||||
endif(${WITH_RADOSGW})
|
||||
if(WITH_RBD)
|
||||
set(DENCODER_EXTRALIBS
|
||||
${DENCODER_EXTRALIBS}
|
||||
rbd_types
|
||||
cls_rbd_client
|
||||
rbd_replay_types)
|
||||
if(LINUX)
|
||||
list(APPEND dencoder_srcs
|
||||
$<TARGET_OBJECTS:krbd_objs>
|
||||
$<TARGET_OBJECTS:parse_secret_objs>)
|
||||
set(DENCODER_EXTRALIBS
|
||||
${DENCODER_EXTRALIBS}
|
||||
keyutils
|
||||
udev)
|
||||
endif(LINUX)
|
||||
${DENCODER_EXTRALIBS}
|
||||
rbd_types
|
||||
cls_rbd_client
|
||||
rbd_replay_types
|
||||
keyutils
|
||||
udev)
|
||||
list(APPEND dencoder_srcs
|
||||
$<TARGET_OBJECTS:krbd_objs>
|
||||
$<TARGET_OBJECTS:parse_secret_objs>)
|
||||
endif(WITH_RBD)
|
||||
|
||||
add_executable(ceph-dencoder ${dencoder_srcs})
|
||||
@ -820,7 +816,7 @@ install(PROGRAMS
|
||||
|
||||
add_subdirectory(bash_completion)
|
||||
|
||||
if(KEYUTILS_FOUND)
|
||||
if(WITH_LIBCEPHFS OR WITH_RBD)
|
||||
set(parse_secret_files
|
||||
common/secret.c)
|
||||
add_library(parse_secret_objs OBJECT ${parse_secret_files})
|
||||
@ -876,11 +872,8 @@ endif(WITH_LIBCEPHFS)
|
||||
|
||||
add_subdirectory(journal)
|
||||
|
||||
if(LINUX)
|
||||
add_library(krbd_objs OBJECT krbd.cc)
|
||||
endif()
|
||||
|
||||
if(${WITH_RBD})
|
||||
add_library(krbd_objs OBJECT krbd.cc)
|
||||
add_subdirectory(librbd)
|
||||
if(WITH_FUSE)
|
||||
add_subdirectory(rbd_fuse)
|
||||
|
Loading…
Reference in New Issue
Block a user