diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-01-05 09:37:00 -0800 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-01-12 15:19:04 -0800 |
commit | 9f96db71252fc66b72c433e2ca0d49e031c6a5fd (patch) | |
tree | 494132dae14dba3de18a9013f2299cfc37cceda5 /lib/meson.build | |
parent | 3006686b536942f6f96675e3d12b793087e78e6a (diff) | |
download | libfuse-9f96db71252fc66b72c433e2ca0d49e031c6a5fd.tar.gz |
Added experimental support for building with Meson+Ninja
Diffstat (limited to 'lib/meson.build')
-rw-r--r-- | lib/meson.build | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/meson.build b/lib/meson.build new file mode 100644 index 0000000..287dc86 --- /dev/null +++ b/lib/meson.build @@ -0,0 +1,47 @@ +# Attention, emacs, please use -*- mode: python -*- +# (even though this isn't actually Python code) + +libfuse_sources = ['fuse.c', 'fuse_i.h', 'fuse_loop.c', 'fuse_loop_mt.c', + 'fuse_lowlevel.c', 'fuse_misc.h', 'fuse_opt.c', + 'fuse_signals.c', 'buffer.c', 'cuse_lowlevel.c', + 'helper.c', 'modules/subdir.c' ] + +if host_machine.system().startswith('linux') + libfuse_sources += [ 'mount.c', 'mount_util.c' ] +else + libfuse_sources += [ 'mount_bsd.c' ] +endif + +if cfg.has('HAVE_ICONV') + libfuse_sources += [ 'modules/iconv.c' ] +endif + +deps = [ thread_dep ] +libdl = meson.get_compiler('c').find_library('dl') +if libdl.found() + deps += [ libdl ] +endif + +if host_machine.system().startswith('netbsd') + deps += [ cc.find_library('perfuse'), + cc.find_library('puffs') ] +endif + +fusermount_path = join_paths(get_option('prefix'), get_option('bindir')) +libfuse = library('fuse3', libfuse_sources, version: '3.0.0', install: true, + soversion: '3', include_directories: include_dirs, + dependencies: deps, + link_depends: 'fuse_versionscript', + c_args: [ '-DFUSE_USE_VERSION=30', + '-DFUSERMOUNT_DIR="{}"'.format(fusermount_path) ], + link_args: ['-Wl,--version-script,' + meson.current_source_dir() + + '/fuse_versionscript' ]) + +pkg = import('pkgconfig') +pkg.generate(libraries: [ libfuse, '-lpthread' ], + libraries_private: '-ldl', + version: meson.project_version(), + name: 'fuse3', + description: 'Filesystem in Userspace', + subdirs: 'fuse3') + |