Commit c4fedbc2 authored by Marc Vef's avatar Marc Vef
Browse files

Auto stash for revert of "Use Fuse3 with stackfs"

parent 5fc81ed6
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
# Find the FUSE includes and library
#
#  FUSE_INCLUDE_DIR - where to find fuse.h, etc.
#  FUSE_LIBRARIES   - List of libraries when using FUSE.
#  FUSE_FOUND       - True if FUSE lib is found.

# check if already in cache, be silent
IF (FUSE_INCLUDE_DIR)
    SET (FUSE_FIND_QUIETLY TRUE)
ENDIF (FUSE_INCLUDE_DIR)

# find includes
FIND_PATH (FUSE_INCLUDE_DIR fuse.h
        /usr/local/include/osxfuse
        /usr/local/include
        /usr/include
        )

# find lib
if (APPLE)
    SET(FUSE_NAMES libosxfuse.dylib fuse)
else (APPLE)
    SET(FUSE_NAMES fuse)
endif (APPLE)
FIND_LIBRARY(FUSE_LIBRARIES
        NAMES ${FUSE_NAMES}
        PATHS /lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/lib/x86_64-linux-gnu
        )

include ("FindPackageHandleStandardArgs")
find_package_handle_standard_args ("FUSE" DEFAULT_MSG
        FUSE_INCLUDE_DIR FUSE_LIBRARIES)

mark_as_advanced (FUSE_INCLUDE_DIR FUSE_LIBRARIES)
 No newline at end of file
+34 −0
Original line number Diff line number Diff line
# Try to find fuse (devel)
# Once done, this will define
#
# FUSE3_FOUND - system has fuse
# FUSE3_INCLUDE_DIRS - the fuse include directories
# FUSE3_LIBRARIES - fuse libraries directories

if(FUSE3_INCLUDE_DIRS AND FUSE3_LIBRARIES)
    set(FUSE3_FIND_QUIETLY TRUE)
endif(FUSE3_INCLUDE_DIRS AND FUSE3_LIBRARIES)

find_path( FUSE3_INCLUDE_DIR fuse3/fuse_lowlevel.h
        HINTS
        /usr
        /usr/local
        ${FUSE3_DIR}
        PATH_SUFFIXES include )

find_library( FUSE3_LIBRARY fuse3
        HINTS
        /usr
        /usr/local
        ${FUSE3_DIR}
        PATH_SUFFIXES lib )

set(FUSE3_INCLUDE_DIRS ${FUSE3_INCLUDE_DIR})
set(FUSE3_LIBRARIES ${FUSE3_LIBRARY})

# handle the QUIETLY and REQUIRED arguments and set FUSE3_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(fuse3 DEFAULT_MSG FUSE3_INCLUDE_DIR FUSE3_LIBRARY)

mark_as_advanced(FUSE3_INCLUDE_DIR FUSE3_LIBRARY)
 No newline at end of file
+0 −6
Original line number Diff line number Diff line
@@ -7,14 +7,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -D_FILE_OFFSET_BITS=64")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})

set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
#find_package(PkgConfig)
find_package(FUSE REQUIRED)

#set(PKG_CONFIG_PATH "${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig")
#
#pkg_check_modules(FUSE fuse3)


include_directories(${FUSE_INCLUDE_DIR})
set(SOURCE_FILES main.c)
add_executable(stackfs_lowlevel ${SOURCE_FILES})
+1 −1
Original line number Diff line number Diff line
#define FUSE_USE_VERSION 26
#define FUSE_USE_VERSION 30
#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include <stdarg.h>