2021-02-03 17:18:41 +02:00
|
|
|
project('wireplumber', ['c'],
|
2021-08-19 18:05:43 +03:00
|
|
|
version : '0.4.2',
|
2019-05-31 12:13:01 +03:00
|
|
|
license : 'MIT',
|
2021-02-11 16:14:40 +02:00
|
|
|
meson_version : '>= 0.54.0',
|
2019-04-03 18:31:05 +03:00
|
|
|
default_options : [
|
|
|
|
|
'warning_level=1',
|
2019-09-05 10:11:26 -04:00
|
|
|
'buildtype=debugoptimized',
|
2019-04-03 18:31:05 +03:00
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
2020-11-16 11:06:11 +02:00
|
|
|
wireplumber_api_version = '0.4'
|
2019-05-29 12:47:26 +03:00
|
|
|
wireplumber_so_version = '0'
|
|
|
|
|
|
2021-05-06 12:15:52 +03:00
|
|
|
wireplumber_headers_dir = get_option('includedir') / 'wireplumber-' + wireplumber_api_version / 'wp'
|
2020-06-02 18:26:40 +03:00
|
|
|
|
2021-07-06 09:40:39 +10:00
|
|
|
wireplumber_bin_dir = get_option('prefix') / get_option('bindir')
|
|
|
|
|
wireplumber_module_dir = get_option('prefix') / get_option('libdir') / 'wireplumber-' + wireplumber_api_version
|
|
|
|
|
wireplumber_data_dir = get_option('prefix') / get_option('datadir') / 'wireplumber'
|
|
|
|
|
wireplumber_config_dir = get_option('prefix') / get_option('sysconfdir') / 'wireplumber'
|
2021-02-01 17:44:57 +02:00
|
|
|
|
2021-04-09 15:50:17 +03:00
|
|
|
cc = meson.get_compiler('c')
|
|
|
|
|
|
2021-06-15 12:04:08 +03:00
|
|
|
glib_req_version = '>= 2.62'
|
2021-06-15 12:00:43 +03:00
|
|
|
add_project_arguments([
|
2021-06-15 12:04:08 +03:00
|
|
|
'-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_62',
|
|
|
|
|
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_62',
|
2021-06-15 12:00:43 +03:00
|
|
|
], language: 'c'
|
|
|
|
|
)
|
|
|
|
|
|
2021-04-20 04:08:58 -04:00
|
|
|
glib_dep = dependency('glib-2.0', version : glib_req_version)
|
2021-02-25 16:58:47 +02:00
|
|
|
gobject_dep = dependency('gobject-2.0', version : glib_req_version)
|
|
|
|
|
gmodule_dep = dependency('gmodule-2.0', version : glib_req_version)
|
|
|
|
|
gio_dep = dependency('gio-2.0', version : glib_req_version)
|
|
|
|
|
giounix_dep = dependency('gio-unix-2.0', version : glib_req_version)
|
2021-04-20 04:08:58 -04:00
|
|
|
spa_dep = dependency('libspa-0.2', version: '>= 0.2')
|
2021-05-07 12:14:43 +03:00
|
|
|
pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.3.26')
|
2021-04-09 15:50:17 +03:00
|
|
|
mathlib = cc.find_library('m')
|
2021-05-06 13:00:55 +03:00
|
|
|
threads_dep = dependency('threads')
|
2019-04-03 18:31:05 +03:00
|
|
|
|
2021-07-10 16:17:37 +03:00
|
|
|
system_lua = get_option('system-lua')
|
|
|
|
|
if system_lua
|
2021-07-27 21:04:59 +02:00
|
|
|
if get_option('system-lua-version') != 'auto'
|
|
|
|
|
lua_version_requested = get_option('system-lua-version')
|
|
|
|
|
lua_dep = dependency('lua-' + lua_version_requested, required: false)
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua' + lua_version_requested, required: false)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
error('Specified Lua version "' + lua_version_requested + '" not found')
|
|
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
lua_dep = dependency('lua-5.4', required: false)
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua5.4', required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua54', required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua-5.3', required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua5.3', required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua53', required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
lua_dep = dependency('lua', version: ['>=5.3.0'], required: false)
|
|
|
|
|
endif
|
|
|
|
|
if not lua_dep.found()
|
|
|
|
|
error ('Could not find lua. Lua version 5.4 or 5.3 required')
|
|
|
|
|
endif
|
2021-01-23 19:11:38 +02:00
|
|
|
endif
|
|
|
|
|
else
|
|
|
|
|
lua_proj = subproject('lua', default_options: ['default_library=static'])
|
|
|
|
|
lua_dep = lua_proj.get_variable('lua_dep')
|
2020-12-01 10:53:48 +02:00
|
|
|
endif
|
2021-07-10 16:17:37 +03:00
|
|
|
summary({'Lua version': lua_dep.version() + (system_lua ? ' (system)' : ' (built-in)')})
|
2020-12-01 10:53:48 +02:00
|
|
|
|
2019-04-10 12:32:51 +03:00
|
|
|
gnome = import('gnome')
|
2019-12-12 20:19:19 +02:00
|
|
|
pkgconfig = import('pkgconfig')
|
2021-06-09 11:46:24 +03:00
|
|
|
fs = import('fs')
|
2019-04-10 12:32:51 +03:00
|
|
|
|
2019-04-16 15:42:10 +03:00
|
|
|
wp_lib_include_dir = include_directories('lib')
|
|
|
|
|
|
2020-12-20 22:12:11 +02:00
|
|
|
common_flags = [
|
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
|
'-Wsuggest-attribute=format',
|
|
|
|
|
'-Wsign-compare',
|
|
|
|
|
'-Wpointer-arith',
|
|
|
|
|
'-Wpointer-sign',
|
|
|
|
|
'-Wformat',
|
|
|
|
|
'-Wformat-security',
|
|
|
|
|
'-Wimplicit-fallthrough',
|
|
|
|
|
'-Wmissing-braces',
|
|
|
|
|
'-Wtype-limits',
|
|
|
|
|
'-Wvariadic-macros',
|
|
|
|
|
'-Wno-missing-field-initializers',
|
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
|
'-Wno-pedantic',
|
|
|
|
|
'-Wold-style-declaration',
|
|
|
|
|
'-Wunused-result',
|
|
|
|
|
]
|
|
|
|
|
add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c')
|
2020-01-16 18:50:07 +02:00
|
|
|
|
2019-04-10 12:32:51 +03:00
|
|
|
subdir('lib')
|
2020-01-22 17:06:01 +02:00
|
|
|
subdir('docs')
|
2020-11-13 19:54:00 +02:00
|
|
|
subdir('modules')
|
2020-11-15 19:14:21 +02:00
|
|
|
subdir('src')
|
2021-09-14 05:07:41 +01:00
|
|
|
|
|
|
|
|
if get_option('tests')
|
|
|
|
|
subdir('tests')
|
|
|
|
|
endif
|