]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake/cephfs: fix options to enable client and dependencies 62108/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 5 Mar 2025 18:22:38 +0000 (13:22 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 5 Mar 2025 18:23:18 +0000 (13:23 -0500)
invoking cmake with -DWITH_LIBCEPHFS=OFF fails to configure the client target:

CMake Error at src/client/CMakeLists.txt:13 (target_link_libraries):
  Target "client" links to:

    Boost::locale

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

because the client target is not conditional on WITH_LIBCEPHFS in src/CMakeLists.txt:

add_subdirectory(client)

if(WITH_LIBCEPHFS)

because client is also needed for ceph-fuse, make the client and its
dependencies depend on WITH_LIBCEPHFS OR WITH_FUSE

Signed-off-by: Casey Bodley <cbodley@redhat.com>
CMakeLists.txt
src/CMakeLists.txt

index a2a911af940c73837988c0d7e3c11592f93956bc..fea65517dcf8604292a7c0bc61754b44487597e2 100644 (file)
@@ -729,7 +729,7 @@ if(WITH_RADOSGW AND WITH_RADOSGW_LUA_PACKAGES)
   list(APPEND BOOST_COMPONENTS filesystem)
 endif()
 
-if(WITH_LIBCEPHFS)
+if(WITH_LIBCEPHFS OR WITH_FUSE)
   find_package(ICU REQUIRED COMPONENTS uc i18n)
   list(APPEND BOOST_COMPONENTS locale)
 endif()
index afa13b79288eb764d76e3cf88a05fce4b96622af..d1ff371d50a39d33514c33adabc4ef86a0e22c48 100644 (file)
@@ -833,7 +833,10 @@ install(PROGRAMS
   DESTINATION sbin)
 
 add_subdirectory(bash_completion)
-add_subdirectory(client)
+
+if(WITH_LIBCEPHFS OR WITH_FUSE)
+  add_subdirectory(client)
+endif()
 
 if(WITH_LIBCEPHFS)
   set(libcephfs_srcs libcephfs.cc)