client/fuse_ll.cc is now including <fuse.h> and <fuse_lowlevel.h>
instead of <fuse/fuse.h> and <fuse/fuse_lowlevel.h>, so we need to add
the fuse directory to the FUSE_INCLUDE_DIRS variable
using find_path() with just fuse.h was finding a /usr/include/fuse.h
instead of the one in /usr/include/fuse/. looking for fuse_common.h and
fuse_lowlevel.h first causes it to generate the correct
FUSE_INCLUDE_DIRS=/usr/include/fuse
Fixes: #12909
Signed-off-by: Casey Bodley <cbodley@redhat.com>
find_path(
FUSE_INCLUDE_DIRS
- NAMES fuse.h
+ NAMES fuse_common.h fuse_lowlevel.h fuse.h
PATHS "${PC_FUSE_INCLUDE_DIRS}"
DOC "Include directories for FUSE"
)
endif(NOT FUSE_LIBRARIES)
if(FUSE_FOUND)
- if(EXISTS "${FUSE_INCLUDE_DIRS}/fuse/fuse_common.h")
- file(READ "${FUSE_INCLUDE_DIRS}/fuse/fuse_common.h" _contents)
+ if(EXISTS "${FUSE_INCLUDE_DIRS}/fuse_common.h")
+ file(READ "${FUSE_INCLUDE_DIRS}/fuse_common.h" _contents)
string(REGEX REPLACE ".*# *define *FUSE_MAJOR_VERSION *([0-9]+).*" "\\1" FUSE_MAJOR_VERSION "${_contents}")
string(REGEX REPLACE ".*# *define *FUSE_MINOR_VERSION *([0-9]+).*" "\\1" FUSE_MINOR_VERSION "${_contents}")
set(FUSE_VERSION "${FUSE_MAJOR_VERSION}.${FUSE_MINOR_VERSION}")
client/fuse_ll.cc)
add_executable(ceph-fuse ${ceph_fuse_srcs})
target_link_libraries(ceph-fuse fuse client global)
+ set_target_properties(ceph-fuse PROPERTIES COMPILE_FLAGS "-I${FUSE_INCLUDE_DIRS}")
install(TARGETS ceph-fuse DESTINATION bin)
endif(WITH_FUSE)
endif(WITH_LIBCEPHFS)