aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-06-12 11:23:00 +0300
committerGitHub <noreply@github.com>2017-06-12 11:23:00 +0300
commitda64da3617f5327e4db866daf77668477ddb5e77 (patch)
tree4a1608973cb71f60ac399a1123a82089620c65db
parentf792641b34a83d61a421f0d76a8c72a956bdb073 (diff)
parenta3dda095bc6bd3725984daab3cfa02cb90d6bf21 (diff)
downloadmeson-da64da3617f5327e4db866daf77668477ddb5e77.zip
meson-da64da3617f5327e4db866daf77668477ddb5e77.tar.gz
meson-da64da3617f5327e4db866daf77668477ddb5e77.tar.bz2
Merge pull request #1919 from fmuellner/master
gnome: Guard all cflags passed to g-ir-scanner
-rw-r--r--mesonbuild/modules/gnome.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 6cc1e5d..6ec7040 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -367,7 +367,8 @@ class GnomeModule(ExtensionModule):
gi_includes.update([girdir])
elif isinstance(dep, (build.StaticLibrary, build.SharedLibrary)):
for incd in dep.get_include_dirs():
- cflags.update(incd.get_incdirs())
+ for idir in incd.get_incdirs():
+ cflags.update(["-I%s" % idir])
else:
mlog.log('dependency %s not handled to build gir files' % dep)
continue
@@ -458,10 +459,6 @@ class GnomeModule(ExtensionModule):
sanitize = compiler.get_options().get('b_sanitize')
if sanitize:
cflags += compilers.sanitizer_compile_args(sanitize)
- if cflags:
- scan_command += ['--cflags-begin']
- scan_command += cflags
- scan_command += ['--cflags-end']
if kwargs.get('symbol_prefix'):
sym_prefix = kwargs.pop('symbol_prefix')
if not isinstance(sym_prefix, str):
@@ -524,9 +521,12 @@ class GnomeModule(ExtensionModule):
# ldflags will be misinterpreted by gir scanner (showing
# spurious dependencies) but building GStreamer fails if they
# are not used here.
- cflags, ldflags, gi_includes = self._get_dependencies_flags(deps, state, depends,
- use_gir_args=True)
- scan_command += list(cflags)
+ dep_cflags, ldflags, gi_includes = self._get_dependencies_flags(deps, state, depends,
+ use_gir_args=True)
+ cflags += list(dep_cflags)
+ scan_command += ['--cflags-begin']
+ scan_command += cflags
+ scan_command += ['--cflags-end']
# need to put our output directory first as we need to use the
# generated libraries instead of any possibly installed system/prefix
# ones.