mark_as_advanced(
FUSE_INCLUDE_DIRS FUSE_LIBRARIES)
+
+if(FUSE_FOUND)
+ if(NOT TARGET FUSE::FUSE)
+ add_library(FUSE::FUSE UNKNOWN IMPORTED)
+ set_target_properties(FUSE::FUSE PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${FUSE_INCLUDE_DIRS}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${FUSE_LIBRARIES}"
+ VERSION "${FUSE_VERSION}")
+ endif()
+endif()
target_link_libraries(ceph-osd osd os global-static common
${BLKID_LIBRARIES})
if(WITH_FUSE)
- target_link_libraries(ceph-osd ${FUSE_LIBRARIES})
+ target_link_libraries(ceph-osd FUSE::FUSE)
endif()
set_target_properties(ceph-osd PROPERTIES
POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE}
ceph_fuse.cc
client/fuse_ll.cc)
add_executable(ceph-fuse ${ceph_fuse_srcs})
- target_link_libraries(ceph-fuse ${FUSE_LIBRARIES}
+ target_link_libraries(ceph-fuse FUSE::FUSE
${GSSAPI_LIBRARIES} client ceph-common global-static ${EXTRALIBS})
set_target_properties(ceph-fuse PROPERTIES
- COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}"
POSITION_INDEPENDENT_CODE ${EXE_LINKER_USE_PIE})
install(TARGETS ceph-fuse DESTINATION bin)
install(PROGRAMS mount.fuse.ceph DESTINATION ${CMAKE_INSTALL_SBINDIR})
endif(HAVE_LIBAIO)
if(WITH_FUSE)
- target_include_directories(os SYSTEM PRIVATE ${FUSE_INCLUDE_DIRS})
- target_link_libraries(os ${FUSE_LIBRARIES})
+ target_link_libraries(os FUSE::FUSE)
endif()
if(HAVE_LIBZFS)
add_executable(rbd-fuse
rbd-fuse.cc)
target_link_libraries(rbd-fuse
- ceph-common librbd librados global ${FUSE_LIBRARIES})
+ ceph-common librbd librados global FUSE::FUSE)
install(TARGETS rbd-fuse DESTINATION bin)
RadosDump.cc)
target_link_libraries(ceph-objectstore-tool osd os global Boost::program_options ${CMAKE_DL_LIBS})
if(WITH_FUSE)
- target_link_libraries(ceph-objectstore-tool ${FUSE_LIBRARIES})
+ target_link_libraries(ceph-objectstore-tool FUSE::FUSE)
endif(WITH_FUSE)
install(TARGETS ceph-objectstore-tool DESTINATION bin)