From 93b4fc59cf8f1a7438a077e562f562f69c4b21ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Tue, 28 Dec 2021 17:14:10 +0100 Subject: [PATCH] treewide: meson.build: get PIPEWIRE_{CONFIG,MODULE}_DIR from dependency Instead of hard-coding the paths relative to the project root, retrieve the correct paths from `pipewire_dep`. --- meson.build | 4 ++-- src/modules/meson.build | 4 ++-- src/tests/meson.build | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 1ea6f7c6e..20d09f59b 100644 --- a/meson.build +++ b/meson.build @@ -508,8 +508,8 @@ if meson.version().version_compare('>=0.58.0') builddir = meson.project_build_root() srcdir = meson.project_source_root() - devenv.set('PIPEWIRE_CONFIG_DIR', builddir / 'src' / 'daemon') - devenv.set('PIPEWIRE_MODULE_DIR', builddir / 'src' / 'modules') + devenv.set('PIPEWIRE_CONFIG_DIR', pipewire_dep.get_variable(internal: 'confdatadir')) + devenv.set('PIPEWIRE_MODULE_DIR', pipewire_dep.get_variable(internal: 'moduledir')) devenv.set('SPA_PLUGIN_DIR', spa_dep.get_variable(internal: 'plugindir')) devenv.set('SPA_DATA_DIR', srcdir / 'spa' / 'plugins') diff --git a/src/modules/meson.build b/src/modules/meson.build index d576c8f2f..242914ec2 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -380,8 +380,8 @@ test('pw-test-protocol-native', ), env : [ 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), - 'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.project_build_root()), - 'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.project_build_root()) + 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'confdatadir')), + 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'moduledir')), ] ) diff --git a/src/tests/meson.build b/src/tests/meson.build index 1247438df..3e8d05012 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -14,8 +14,8 @@ foreach a : test_apps install_dir : installed_tests_execdir), env : [ 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable(internal: 'plugindir')), - 'PIPEWIRE_CONFIG_DIR=@0@/src/daemon/'.format(meson.project_build_root()), - 'PIPEWIRE_MODULE_DIR=@0@/src/modules/'.format(meson.project_build_root()) + 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'confdatadir')), + 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable(internal: 'moduledir')), ]) if installed_tests_enabled