[gobject-introspection: 1/2] dumper: use cflags passed through --cflags-begin/end



commit d4d6851815b8dec0db7c10cdf7bcc8c650279d8c
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Jun 19 20:11:00 2018 +0200

    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.

 giscanner/dumper.py | 5 +++--
 1 file 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]