From c7c07da5a23be3c8652e9d65b18778199f1383c2 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sat, 3 Sep 2016 16:23:02 +0200 Subject: [PATCH] src/CMakeLists.txt: exclude parts not buildable on FreeBSD - FreeBSD does not have keyutils or any kernel type security store So using secret.c is not really relevant here - Have common/secret.c depend on KEYUTILS_FOUND - This also excludes building mount.cephfs, Next to the fact that this is 100% linux bases mount stuff - krbd is the Linux kernel version for RBD based disks, but again completely Linux based and porting to FreeBSD, if any, has to follow a different route Signed-off-by: Willem Jan Withagen --- src/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9afe2b3ef91..e6b2a94c0d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -696,9 +696,11 @@ install(PROGRAMS add_subdirectory(bash_completion) -set(parse_secret_files - common/secret.c) -add_library(parse_secret_objs OBJECT ${parse_secret_files}) +if(KEYUTILS_FOUND) + set(parse_secret_files + common/secret.c) + add_library(parse_secret_objs OBJECT ${parse_secret_files}) +endif() if(WITH_LIBCEPHFS) add_subdirectory(client) @@ -750,7 +752,9 @@ endif(WITH_LIBCEPHFS) add_subdirectory(journal) -add_library(krbd_objs OBJECT krbd.cc) +if(LINUX) + add_library(krbd_objs OBJECT krbd.cc) +endif() if(${WITH_RBD}) add_subdirectory(librbd) -- 2.39.5