|
|
|
@ -1,12 +1,12 @@
|
|
|
|
|
project('webfuse', 'c', 'cpp', version: '0.3.0', license: 'LGPL-3.0+')
|
|
|
|
|
|
|
|
|
|
without_install = get_option('without_install')
|
|
|
|
|
without_adapter = get_option('without_adapter')
|
|
|
|
|
without_provider = get_option('without_provider')
|
|
|
|
|
without_tests = get_option('without_tests') or without_adapter or without_provider
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libwebsockets_dep = dependency('libwebsockets', version: '>=4.0.1')
|
|
|
|
|
jansson_dep = dependency('jansson', version: '>=2.11', fallback: ['jansson', 'jansson_dep'])
|
|
|
|
|
libfuse_dep = dependency('fuse3', version: '>=3.8.0', fallback: ['fuse3', 'libfuse_dep'])
|
|
|
|
|
gtest_dep = dependency('gtest', version: '>=1.10.0', fallback: ['gtest', 'gtest_dep'])
|
|
|
|
|
gmock_main_dep = dependency('gmock_main', version: '>=1.10.0', fallback: ['gtest', 'gmock_main_main_dep'])
|
|
|
|
|
|
|
|
|
|
pkg_config = import('pkgconfig')
|
|
|
|
|
|
|
|
|
@ -43,12 +43,12 @@ webfuse_core_dep = declare_dependency(
|
|
|
|
|
link_with: webfuse_core,
|
|
|
|
|
dependencies: [jansson_dep, libwebsockets_dep])
|
|
|
|
|
|
|
|
|
|
if not without_install
|
|
|
|
|
install_subdir('include/webfuse/core', install_dir: 'include/webfuse')
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Webfuse provider
|
|
|
|
|
|
|
|
|
|
if not without_provider
|
|
|
|
|
|
|
|
|
|
webfuse_provider_static = static_library('webfuse_provider',
|
|
|
|
|
'lib/webfuse/provider/api.c',
|
|
|
|
|
'lib/webfuse/provider/impl/url.c',
|
|
|
|
@ -79,15 +79,13 @@ webfuse_provider = shared_library('webfuse_provider',
|
|
|
|
|
c_args: ['-fvisibility=hidden', '-DWFP_API=WFP_EXPORT'],
|
|
|
|
|
include_directories: private_inc_dir,
|
|
|
|
|
dependencies: [webfuse_provider_static_dep],
|
|
|
|
|
install: not without_install)
|
|
|
|
|
install: true)
|
|
|
|
|
|
|
|
|
|
webfuse_provider_dep = declare_dependency(
|
|
|
|
|
include_directories: inc_dir,
|
|
|
|
|
link_with: [webfuse_provider],
|
|
|
|
|
dependencies: [libwebsockets_dep, jansson_dep])
|
|
|
|
|
|
|
|
|
|
if not without_install
|
|
|
|
|
|
|
|
|
|
install_headers('include/webfuse_provider.h', subdir: 'webfuse')
|
|
|
|
|
install_subdir('include/webfuse/provider', install_dir: 'include/webfuse')
|
|
|
|
|
|
|
|
|
@ -103,6 +101,10 @@ endif
|
|
|
|
|
|
|
|
|
|
# Webfuse adapter
|
|
|
|
|
|
|
|
|
|
if not without_adapter
|
|
|
|
|
|
|
|
|
|
libfuse_dep = dependency('fuse3', version: '>=3.8.0', fallback: ['fuse3', 'libfuse_dep'])
|
|
|
|
|
|
|
|
|
|
webfuse_adapter_static = static_library('webfuse_adapter',
|
|
|
|
|
'lib/webfuse/adapter/api.c',
|
|
|
|
|
'lib/webfuse/adapter/impl/filesystem.c',
|
|
|
|
@ -138,15 +140,13 @@ webfuse_adapter = shared_library('webfuse_adapter',
|
|
|
|
|
c_args: ['-fvisibility=hidden', '-DWF_API=WF_EXPORT'],
|
|
|
|
|
include_directories: private_inc_dir,
|
|
|
|
|
dependencies: [webfuse_adapter_static_dep, libfuse_dep],
|
|
|
|
|
install: not without_install)
|
|
|
|
|
install: true)
|
|
|
|
|
|
|
|
|
|
webfuse_adapter_dep = declare_dependency(
|
|
|
|
|
include_directories: inc_dir,
|
|
|
|
|
link_with: [webfuse_adapter],
|
|
|
|
|
dependencies: [libfuse_dep, libwebsockets_dep, jansson_dep])
|
|
|
|
|
|
|
|
|
|
if not without_install
|
|
|
|
|
|
|
|
|
|
install_headers('include/webfuse_adapter.h', subdir: 'webfuse')
|
|
|
|
|
install_subdir('include/webfuse/adapter', install_dir: 'include/webfuse')
|
|
|
|
|
|
|
|
|
@ -162,6 +162,11 @@ endif
|
|
|
|
|
|
|
|
|
|
# Unit Tests
|
|
|
|
|
|
|
|
|
|
if not without_tests
|
|
|
|
|
|
|
|
|
|
gtest_dep = dependency('gtest', version: '>=1.10.0', fallback: ['gtest', 'gtest_dep'])
|
|
|
|
|
gmock_main_dep = dependency('gmock_main', version: '>=1.10.0', fallback: ['gtest', 'gmock_main_main_dep'])
|
|
|
|
|
|
|
|
|
|
fscheck = executable('fs_check',
|
|
|
|
|
'test/webfuse/tests/integration/fs_check.c')
|
|
|
|
|
|
|
|
|
@ -270,3 +275,5 @@ alltests = executable('alltests',
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
test('alltests', alltests)
|
|
|
|
|
|
|
|
|
|
endif
|