summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-06-19 20:11:00 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-06-20 18:34:48 +0200
commitd4d6851815b8dec0db7c10cdf7bcc8c650279d8c (patch)
tree420f2027a3fedf773c44373710542bb3a6e4da0a
parentb310d006968030862714398e89254402d0b00edb (diff)
downloadgobject-introspection-d4d6851815b8dec0db7c10cdf7bcc8c650279d8c.tar.gz
dumper: use cflags passed through --cflags-begin/end
When GI is build without an installed glib and meson builds glib as a subproject the include paths are passed through --cflags-begin/end. The dumper didn't use them but worked anyway if glib was installed somewhere and pkg-config returned some cflags. This make the GI build work with meson without having glib installed.
-rw-r--r--giscanner/dumper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index d6956da2..bb97bc81 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -203,8 +203,9 @@ class DumpCompiler(object):
return out.decode('ascii').split()
def _compile(self, *sources):
- pkgconfig_flags = self._run_pkgconfig('--cflags')
- return self._compiler.compile(pkgconfig_flags,
+ cflags = self._run_pkgconfig('--cflags')
+ cflags.extend(self._options.cflags)
+ return self._compiler.compile(cflags,
self._options.cpp_includes,
sources,
self._options.init_sections)