diff --git a/lib/wp/meson.build b/lib/wp/meson.build index d6665799..ad6ee14e 100644 --- a/lib/wp/meson.build +++ b/lib/wp/meson.build @@ -124,8 +124,6 @@ wpbuildbasedirs = configure_file ( wp_lib = library('wireplumber-' + wireplumber_api_version, wp_lib_sources, wp_lib_priv_sources, wpenums_c, wpenums_h, wpversion, wpbuildbasedirs, c_args : [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', '-DBUILDING_WP', ], install: true, diff --git a/meson.build b/meson.build index ce2818e2..f48b1c3f 100644 --- a/meson.build +++ b/meson.build @@ -134,6 +134,12 @@ common_flags = [ ] add_project_arguments(cc.get_supported_arguments(common_flags), language: 'c') +common_args = [ + '-D_GNU_SOURCE', + '-DG_LOG_USE_STRUCTURED', +] +add_project_arguments(common_args, language: 'c') + subdir('lib') if build_modules subdir('modules') diff --git a/modules/meson.build b/modules/meson.build index 46baa8e3..7eb498e5 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -1,14 +1,8 @@ -common_c_args = [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', -] - shared_library( 'wireplumber-module-settings', [ 'module-settings.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -23,7 +17,6 @@ shared_library( 'module-dbus-connection.c', dbus_connection_enums, ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep], @@ -34,7 +27,6 @@ shared_library( [ 'module-default-nodes-api.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -50,7 +42,6 @@ shared_library( reserve_device_interface_src, reserve_device_enums, ], - c_args : [common_c_args], include_directories: reserve_device_includes, install : true, install_dir : wireplumber_module_dir, @@ -62,7 +53,6 @@ shared_library( [ 'module-portal-permissionstore.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, giounix_dep], @@ -73,7 +63,6 @@ shared_library( [ 'module-si-audio-adapter.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -84,7 +73,6 @@ shared_library( [ 'module-si-audio-virtual.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -95,7 +83,6 @@ shared_library( [ 'module-si-node.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -106,7 +93,6 @@ shared_library( [ 'module-si-standard-link.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -123,7 +109,6 @@ shared_library( 'module-lua-scripting/api/api.c', m_lua_scripting_resources, ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep, wplua_dep, libintl_dep], @@ -134,7 +119,6 @@ shared_library( [ 'module-mixer-api.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep, mathlib], @@ -145,7 +129,6 @@ shared_library( [ 'module-file-monitor-api.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -156,7 +139,6 @@ shared_library( [ 'module-log-settings.c', ], - c_args : [common_c_args, '-DG_LOG_DOMAIN="m-log-settings"'], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], @@ -168,7 +150,6 @@ if libsystemd_dep.found() or libelogind_dep.found() [ 'module-logind.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep, libsystemd_dep, libelogind_dep], @@ -180,7 +161,6 @@ shared_library( [ 'module-standard-event-source.c', ], - c_args : [common_c_args], install : true, install_dir : wireplumber_module_dir, dependencies : [wp_dep, pipewire_dep], diff --git a/modules/module-lua-scripting/wplua/meson.build b/modules/module-lua-scripting/wplua/meson.build index a07aab02..8c6115e5 100644 --- a/modules/module-lua-scripting/wplua/meson.build +++ b/modules/module-lua-scripting/wplua/meson.build @@ -16,10 +16,6 @@ wplua_resources = gnome.compile_resources( wplua_lib = static_library('wplua-' + wireplumber_api_version, [ wplua_lib_sources, wplua_resources ], - c_args : [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', - ], install: false, include_directories: wplua_include_dir, dependencies : [wp_dep, lua_dep], diff --git a/src/meson.build b/src/meson.build index 733e8c30..3a1b75c5 100644 --- a/src/meson.build +++ b/src/meson.build @@ -30,10 +30,6 @@ if build_daemon wireplumber = executable('wireplumber', wp_sources, - c_args : [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', - ], install: true, dependencies : [gobject_dep, gio_dep, wp_dep, pipewire_dep], ) diff --git a/src/tools/meson.build b/src/tools/meson.build index 9e7d66bc..da12d4ac 100644 --- a/src/tools/meson.build +++ b/src/tools/meson.build @@ -1,9 +1,5 @@ executable('wpctl', 'wpctl.c', - c_args : [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', - ], install: true, dependencies : [gobject_dep, gio_dep, wp_dep, pipewire_dep], ) @@ -15,10 +11,6 @@ install_data('shell-completion/wpctl.zsh', executable('wpexec', 'wpexec.c', - c_args : [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', - ], install: true, dependencies : [gobject_dep, gio_dep, wp_dep, pipewire_dep], ) diff --git a/tests/modules/meson.build b/tests/modules/meson.build index 60dff5ec..f3f694e6 100644 --- a/tests/modules/meson.build +++ b/tests/modules/meson.build @@ -2,23 +2,19 @@ common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] common_env = common_test_env common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -common_args = [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', -] if get_option('dbus-tests') test( 'test-dbus-connection', executable('test-dbus-connection', 'dbus-connection.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-reserve-device', executable('test-reserve-device', 'reserve-device.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) endif @@ -26,34 +22,34 @@ endif test( 'test-file-monitor', executable('test-file-monitor', 'file-monitor.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-si-node', executable('test-si-node', 'si-node.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-si-audio-adapter', executable('test-si-audio-adapter', 'si-audio-adapter.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-si-audio-virtual', executable('test-si-audio-virtual', 'si-audio-virtual.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-si-standard-link', executable('test-si-standard-link', 'si-standard-link.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) diff --git a/tests/scripts/meson.build b/tests/scripts/meson.build index f579f2cb..34bb434a 100644 --- a/tests/scripts/meson.build +++ b/tests/scripts/meson.build @@ -3,13 +3,10 @@ common_env = common_test_env common_env.prepend('WIREPLUMBER_DATA_DIR', meson.current_source_dir()) common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -common_args = [ - '-D_GNU_SOURCE', -] script_tester = executable('script-tester', '..'/'script-tester.c', - dependencies: common_deps, c_args: common_args + dependencies: common_deps ) test( diff --git a/tests/wp/meson.build b/tests/wp/meson.build index f3eabdd8..cc0b9ac8 100644 --- a/tests/wp/meson.build +++ b/tests/wp/meson.build @@ -2,133 +2,129 @@ common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep] common_env = common_test_env common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -common_args = [ - '-D_GNU_SOURCE', - '-DG_LOG_USE_STRUCTURED', -] test( 'test-component-loader', executable('test-component-loader', 'component-loader.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-core', executable('test-core', 'core.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-events', executable('test-events', 'events.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-metadata', executable('test-metadata', 'metadata.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-object-interest', executable('test-object-interest', 'object-interest.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-object-manager', executable('test-object-manager', 'object-manager.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-properties', executable('test-properties', 'properties.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-proxy', executable('test-proxy', 'proxy.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-session-item', executable('test-session-item', 'session-item.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-spa-json', executable('test-spa-json', 'spa-json.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-spa-pod', executable('test-spa-pod', 'spa-pod.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-spa-type', executable('test-spa-type', 'spa-type.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-state', executable('test-state', 'state.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-settings', executable('test-settings', 'settings.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-transition', executable('test-transition', 'transition.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-factory', executable('test-factory', 'factory.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-conf', executable('test-conf', 'conf.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) test( 'test-json-utils', executable('test-json-utils', 'json-utils.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) diff --git a/tests/wplua/meson.build b/tests/wplua/meson.build index 21ff07e3..5f96ef04 100644 --- a/tests/wplua/meson.build +++ b/tests/wplua/meson.build @@ -3,20 +3,17 @@ common_env = common_test_env common_env.prepend('WIREPLUMBER_DATA_DIR', meson.current_source_dir()) common_env.set('G_TEST_SRCDIR', meson.current_source_dir()) common_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) -common_args = [ - '-D_GNU_SOURCE', -] test( 'test-wplua', executable('test-wplua', 'wplua.c', - dependencies: common_deps, c_args: common_args), + dependencies: common_deps), env: common_env, ) script_tester = executable('script-tester', '..'/'script-tester.c', - dependencies: common_deps, c_args: common_args + dependencies: common_deps ) test(