[gtk+/wip/meson: 181/181] build: Use get_pkgconfig_variable()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/meson: 181/181] build: Use get_pkgconfig_variable()
- Date: Wed, 26 Apr 2017 16:42:50 +0000 (UTC)
commit 35b86a84e1bd389042f63fdab70cec0efded324d
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Apr 26 17:10:15 2017 +0100
build: Use get_pkgconfig_variable()
There's no need to run pkg-config ourselves.
gtk/meson.build | 15 ++++-----------
modules/input/meson.build | 27 ++++++++++++++++-----------
2 files changed, 20 insertions(+), 22 deletions(-)
---
diff --git a/gtk/meson.build b/gtk/meson.build
index a948d06..02c352f 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -811,22 +811,15 @@ gtk_deps = [
atk_dep,
epoxy_dep,
libm,
- graphene_dep
+ graphene_dep,
]
if x11_enabled
- runcmd = run_command('pkg-config', '--variable=prefix', 'x11')
- if runcmd.returncode() == 0
- gtk_cargs += '-DX11_DATA_PREFIX="' + runcmd.stdout().strip() + '"'
- else
- error('Could not get x11 data prefix via pkg-config.')
- endif
+ x11_data_prefix = dependency('x11').get_pkgconfig_variable('prefix')
+ gtk_cargs += [ '-DX11_DATA_PREFIX="@0@"'.format(x11_data_prefix), ]
gtk_sources += gtk_x11_sources
- gtk_deps += [
- xi_dep,
- x11_dep,
- ]
+ gtk_deps += [ xi_dep, x11_dep, ]
endif
if wayland_enabled
diff --git a/modules/input/meson.build b/modules/input/meson.build
index 43c3262..0111790 100644
--- a/modules/input/meson.build
+++ b/modules/input/meson.build
@@ -8,21 +8,26 @@
build_dynamic_modules = false
disable_modules = get_option('disable-modules')
if not disable_modules
- runcmd = run_command('pkg-config', '--variable=gmodule_supported', 'gmodule-no-export-2.0')
- if runcmd.returncode() == 0
- gmodule_supported = runcmd.stdout().strip()
- if gmodule_supported == 'true'
- build_dynamic_modules = true
- else
- message('Modules are not supported according to gmodule-no-export-2.0.pc')
- endif
+ gmodule_supported = dependency('gmodule-no-export-2.0').get_pkgconfig_variable('gmodule_supported')
+ if gmodule_supported == 'true'
+ build_dynamic_modules = true
else
- message('WARNING: failed to query if modules are supported!')
+ message('Modules are not supported according to gmodule-no-export-2.0.pc')
endif
endif
-all_immodules = ['am-et', 'cedilla', 'cyrillic-translit', 'inuktitut',
- 'ipa', 'multipress', 'thai', 'ti-er', 'ti-et', 'viqr']
+all_immodules = [
+ 'am-et',
+ 'cedilla',
+ 'cyrillic-translit',
+ 'inuktitut',
+ 'ipa',
+ 'multipress',
+ 'thai',
+ 'ti-er',
+ 'ti-et',
+ 'viqr',
+]
all_immodules += backend_immodules
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]