Skip to content

Commit 70eb1d6

Browse files
committed
cmake/cephfs: fix options to enable client and dependencies
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 <[email protected]>
1 parent d492e85 commit 70eb1d6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ if(WITH_RADOSGW AND WITH_RADOSGW_LUA_PACKAGES)
729729
list(APPEND BOOST_COMPONENTS filesystem)
730730
endif()
731731

732-
if(WITH_LIBCEPHFS)
732+
if(WITH_LIBCEPHFS OR WITH_FUSE)
733733
find_package(ICU REQUIRED COMPONENTS uc i18n)
734734
list(APPEND BOOST_COMPONENTS locale)
735735
endif()

src/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,10 @@ install(PROGRAMS
833833
DESTINATION sbin)
834834

835835
add_subdirectory(bash_completion)
836-
add_subdirectory(client)
836+
837+
if(WITH_LIBCEPHFS OR WITH_FUSE)
838+
add_subdirectory(client)
839+
endif()
837840

838841
if(WITH_LIBCEPHFS)
839842
set(libcephfs_srcs libcephfs.cc)

0 commit comments

Comments
 (0)