modules/gnome: inherit global cflags to g-ir-scanner. Closes #74

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pull/75/head
Igor Gnatenko 10 years ago
parent 7d0c38257d
commit f1d2827bce
  1. 1
      interpreter.py
  2. 4
      modules/gnome.py
  3. 4
      test cases/frameworks/7 gnome/gir/golib.h
  4. 1
      test cases/frameworks/7 gnome/meson.build

@ -623,6 +623,7 @@ class ModuleHolder(InterpreterObject):
state.headers = self.interpreter.build.get_headers()
state.man = self.interpreter.build.get_man()
state.pkgconfig_gens = self.interpreter.build.pkgconfig_gens
state.global_args = self.interpreter.build.global_args
value = fn(state, args, kwargs)
return self.interpreter.module_method_callback(value)

@ -68,6 +68,10 @@ class GnomeModule:
scan_command += ['--include=%s' % inc for inc in includes]
else:
raise MesonException('Gir includes must be str or list')
if state.global_args.get('c'):
scan_command += ['--cflags-begin']
scan_command += state.global_args['c']
scan_command += ['--cflags-end']
scankwargs = {'output' : girfile,
'input' : libsources,
'command' : scan_command}

@ -1,6 +1,10 @@
#ifndef GOLIB_H
#define GOLIB_H
#if !defined (MESON_TEST)
#error "MESON_TEST not defined."
#endif
#include <glib.h>
#include <glib-object.h>

@ -7,6 +7,7 @@ glib = dependency('glib-2.0')
gobj = dependency('gobject-2.0')
gir = dependency('gobject-introspection-1.0')
gmod = dependency('gmodule-2.0')
add_global_arguments('-DMESON_TEST', language : 'c')
subdir('resources')
subdir('gir')

Loading…
Cancel
Save