1libfuse_sources = ['fuse.c', 'fuse_i.h', 'fuse_loop.c', 'fuse_loop_mt.c', 2 'fuse_lowlevel.c', 'fuse_misc.h', 'fuse_opt.c', 3 'fuse_signals.c', 'buffer.c', 'cuse_lowlevel.c', 4 'helper.c', 'modules/subdir.c', 'mount_util.c', 5 'fuse_log.c', 'compat.c' ] 6 7if host_machine.system().startswith('linux') 8 libfuse_sources += [ 'mount.c' ] 9else 10 libfuse_sources += [ 'mount_bsd.c' ] 11endif 12 13deps = [ thread_dep ] 14if private_cfg.get('HAVE_ICONV') 15 libfuse_sources += [ 'modules/iconv.c' ] 16 libiconv = cc.find_library('iconv', required: false) 17 if libiconv.found() 18 deps += [ libiconv ] 19 endif 20endif 21 22libdl = cc.find_library('dl', required: false) 23if libdl.found() 24 deps += [ libdl ] 25endif 26 27if host_machine.system().startswith('netbsd') 28 deps += [ cc.find_library('perfuse'), 29 cc.find_library('puffs') ] 30else 31 # Required for clock_gettime before glibc 2.17 32 deps += cc.find_library('rt') 33endif 34 35fusermount_path = join_paths(get_option('prefix'), get_option('bindir')) 36libfuse = library('fuse3', libfuse_sources, version: meson.project_version(), 37 soversion: '3', include_directories: include_dirs, 38 dependencies: deps, install: true, 39 link_depends: 'fuse_versionscript', 40 c_args: [ '-DFUSE_USE_VERSION=312', 41 '-DFUSERMOUNT_DIR="@0@"'.format(fusermount_path) ], 42 link_args: ['-Wl,--version-script,' + meson.current_source_dir() 43 + '/fuse_versionscript' ]) 44 45pkg = import('pkgconfig') 46pkg.generate(libraries: [ libfuse, '-lpthread' ], 47 libraries_private: '-ldl', 48 version: meson.project_version(), 49 name: 'fuse3', 50 description: 'Filesystem in Userspace', 51 subdirs: 'fuse3') 52 53libfuse_dep = declare_dependency(include_directories: include_dirs, 54 link_with: libfuse, dependencies: deps) 55