mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
cmake: update FUSE_INCLUDE_DIRS to match autoconf
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>
This commit is contained in:
parent
37462359a3
commit
7c00bf05db
@ -73,7 +73,7 @@ endif(PKG_CONFIG_FOUND)
|
||||
|
||||
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"
|
||||
)
|
||||
@ -94,8 +94,8 @@ if(NOT FUSE_LIBRARIES)
|
||||
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}")
|
||||
|
@ -806,6 +806,7 @@ if(WITH_LIBCEPHFS)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user