diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-03-28 14:31:45 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-03-28 14:49:32 +0530 |
commit | 976c9abcd0348ffb29863ac2688c661eda524a47 (patch) | |
tree | 968913d082a1ce8ab8202aee71a9d15ba5f4688d /mesonbuild/modules/gnome.py | |
parent | 03d0feec7ceed1a1ee2e6284a86dbc26a088440f (diff) | |
download | meson-976c9abcd0348ffb29863ac2688c661eda524a47.zip meson-976c9abcd0348ffb29863ac2688c661eda524a47.tar.gz meson-976c9abcd0348ffb29863ac2688c661eda524a47.tar.bz2 |
modules: Start using @SOURCE_ROOT@ and @BUILD_ROOT@
First step in fixing https://github.com/mesonbuild/meson/issues/1419
Also works around an issue in the MinGW windres.exe that causes it to
fail if any of the arguments passed to it contain a space. There seems
to be no way to quote or escape the spaces in the path to make windres
parse the path correctly, so we just warn about it instead.
https://sourceware.org/bugzilla/show_bug.cgi?id=4933
https://github.com/mesonbuild/meson/pull/1346
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 423031d..4b366bf 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -309,7 +309,7 @@ class GnomeModule(ExtensionModule): if hasattr(dep, 'held_object'): dep = dep.held_object if isinstance(dep, InternalDependency): - cflags.update(get_include_args(state.environment, dep.include_directories)) + cflags.update(get_include_args(dep.include_directories)) for lib in dep.libraries: ldflags.update(self._get_link_args(state, lib.held_object, depends, include_rpath)) libdepflags = self._get_dependencies_flags(lib.held_object.get_external_deps(), state, depends, include_rpath, @@ -398,7 +398,7 @@ class GnomeModule(ExtensionModule): scan_command += extra_args scan_command += ['-I' + os.path.join(state.environment.get_source_dir(), state.subdir), '-I' + os.path.join(state.environment.get_build_dir(), state.subdir)] - scan_command += get_include_args(state.environment, girtarget.get_include_dirs()) + scan_command += get_include_args(girtarget.get_include_dirs()) if 'link_with' in kwargs: link_with = kwargs.pop('link_with') @@ -525,9 +525,8 @@ class GnomeModule(ExtensionModule): if not isinstance(incd.held_object, (str, build.IncludeDirs)): raise MesonException( 'Gir include dirs should be include_directories().') - scan_command += get_include_args(state.environment, inc_dirs) - scan_command += get_include_args(state.environment, gir_inc_dirs + inc_dirs, - prefix='--add-include-path=') + scan_command += get_include_args(inc_dirs) + scan_command += get_include_args(gir_inc_dirs + inc_dirs, prefix='--add-include-path=') if isinstance(girtarget, build.Executable): scan_command += ['--program', girtarget] @@ -546,8 +545,7 @@ class GnomeModule(ExtensionModule): typelib_output = '%s-%s.typelib' % (ns, nsversion) typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@'] - typelib_cmd += get_include_args(state.environment, gir_inc_dirs, - prefix='--includedir=') + typelib_cmd += get_include_args(gir_inc_dirs, prefix='--includedir=') for incdir in typelib_includes: typelib_cmd += ["--includedir=" + incdir] @@ -716,7 +714,7 @@ class GnomeModule(ExtensionModule): if not isinstance(incd.held_object, (str, build.IncludeDirs)): raise MesonException( 'Gir include dirs should be include_directories().') - cflags.update(get_include_args(state.environment, inc_dirs)) + cflags.update(get_include_args(inc_dirs)) if cflags: args += ['--cflags=%s' % ' '.join(cflags)] if ldflags: |