]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: update FUSE_INCLUDE_DIRS to match autoconf 5744/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 1 Sep 2015 15:35:42 +0000 (11:35 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 1 Sep 2015 18:11:03 +0000 (14:11 -0400)
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>
cmake/modules/Findfuse.cmake
src/CMakeLists.txt

index 7c1a8789b28e8aa31b5ca6030a48c5fa0c37da35..dd8a6c17faef2e4f3089a8d2959df3c0e74e5135 100644 (file)
@@ -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}")
index 5b8298e1308300e405dba227c7b1a453ccc8a448..eed321004c53b4b42822abde1bfc0cafcf89e789 100644 (file)
@@ -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)