Commit 5fc81ed6 authored by Marc Vef's avatar Marc Vef
Browse files

Use Fuse3 with stackfs

parent 29016c0f
Loading
Loading
Loading
Loading
+0 −34
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
+6 −0
Original line number Diff line number Diff line
@@ -7,8 +7,14 @@ 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 30
#define FUSE_USE_VERSION 26
#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include <stdarg.h>