Commit 4ad81caf authored by Vladimir Stoiakin's avatar Vladimir Stoiakin Committed by Sébastien Blin

meson: add support for plugins

Change-Id: I767d7baa288edeeb93ceb16d6f2bbfff2b48d5c9
Reviewed-by: Sébastien Blin's avatarSébastien Blin <sebastien.blin@savoirfairelinux.com>
parent e1e3a39a
......@@ -50,6 +50,18 @@ if conf.get('ENABLE_VIDEO')
)
endif
if conf.get('ENABLE_PLUGIN')
jamid_targets += custom_target('pluginmanagerinterface.adaptor',
command: [progdbusxxxml2cpp, '@INPUT@', '--adaptor=@OUTPUT@'],
input: 'cx.ring.Ring.PluginManagerInterface.xml',
output: 'dbuspluginmanagerinterface.adaptor.h'
)
jamid_sources += files(
'dbuspluginmanagerinterface.cpp'
)
endif
if progpod2man.found()
jamid_targets += custom_target('jamid.man',
command: [progpod2man, '--section=8', '--release='+meson.project_version(), '--center', '""', '@INPUT@', '@OUTPUT@'],
......@@ -91,3 +103,9 @@ if conf.get('ENABLE_VIDEO')
install_dir: get_option('datadir') / 'dbus-1' / 'interfaces'
)
endif
if conf.get('ENABLE_PLUGIN')
install_data(
'cx.ring.Ring.PluginManagerInterface.xml',
install_dir: get_option('datadir') / 'dbus-1' / 'interfaces'
)
endif
project('jami-daemon', ['c', 'cpp'],
version: '9.1.0',
version: '9.2.0',
license: 'GPL3+',
default_options: ['cpp_std=gnu++14', 'buildtype=debugoptimized'],
meson_version:'>= 0.54'
......@@ -38,20 +38,6 @@ if not depyamlcpp.found()
]).dependency('yaml-cpp')
endif
deplibarchive = dependency('libarchive', version: '>= 3.4.0', required: false)
if not deplibarchive.found()
deplibarchive = modcmake.subproject('libarchive', cmake_options: [
'-DCMAKE_BUILD_TYPE=Release',
'-DCMAKE_INSTALL_LIBDIR=lib',
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
'-DENABLE_TEST=OFF',
'-DENABLE_TAR=OFF',
'-DENABLE_CPIO=OFF',
'-DENABLE_CAT=OFF',
'-DENABLE_LIBXML2=OFF'
]).dependency('archive_static')
endif
depjsoncpp = dependency('jsoncpp', version: '>= 1.6.5',
fallback: ['jsoncpp', 'jsoncpp_dep'], default_options: ['default_library=static'])
depzlib = dependency('zlib', fallback: ['zlib', 'zlib_dep'], default_options: ['default_library=static'])
......@@ -130,6 +116,24 @@ if get_option('video')
endif
endif
if get_option('plugins')
conf.set('ENABLE_PLUGIN', true)
deplibarchive = dependency('libarchive', version: '>= 3.4.0', required: false)
if not deplibarchive.found()
deplibarchive = modcmake.subproject('libarchive', cmake_options: [
'-DCMAKE_BUILD_TYPE=Release',
'-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
'-DENABLE_TEST=OFF',
'-DENABLE_TAR=OFF',
'-DENABLE_CPIO=OFF',
'-DENABLE_CAT=OFF',
'-DENABLE_LIBXML2=OFF'
]).dependency('archive_static')
endif
else
conf.set('ENABLE_PLUGIN', false)
endif
conf.set10('HAVE_COREAUDIO', host_machine.system() == 'darwin')
conf.set10('HAVE_SHM', host_machine.system() == 'linux' and meson.get_compiler('cpp').get_define('__ANDROID__') != '1')
......
option('interfaces', type: 'array', choices: ['library', 'dbus', 'nodejs'], value: ['library'])
option('video', type: 'boolean', value: true, description: 'Enable video support')
option('hw_acceleration', type: 'boolean', value: true, description: 'Enable hardware acceleration')
option('plugins', type: 'boolean', value: true, description: 'Enable support for plugins')
option('name_service', type: 'feature', value: 'auto', description: 'Enable Name Service')
option('opensl', type: 'feature', value: 'auto', description: 'Enable support for OpenSL')
......
......@@ -133,7 +133,6 @@ libjami_dependencies = [
depspeex,
depspeexdsp,
depyamlcpp,
deplibarchive,
depjsoncpp,
depzlib
]
......@@ -261,6 +260,16 @@ if conf.get('ENABLE_VIDEO')
endif
endif
if conf.get('ENABLE_PLUGIN')
libjami_sources += files(
'client/plugin_manager_interface.cpp',
'plugin/jamipluginmanager.cpp',
'plugin/pluginloaderdl.cpp',
'plugin/pluginmanager.cpp'
)
libjami_dependencies += deplibarchive
endif
libjami = library('jami',
version: meson.project_version(),
include_directories: libjami_includedirs,
......@@ -296,6 +305,12 @@ if get_option('interfaces').contains('library')
subdir: 'dring'
)
endif
if conf.get('ENABLE_PLUGIN')
install_headers(
'dring/plugin_manager_interface.h',
subdir: 'dring'
)
endif
modpkgconfig.generate(
libjami,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment