diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-02-23 20:44:50 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-02-26 07:42:47 -0500 |
commit | 438f219864df10b6143725acbf574abcd38f9d8f (patch) | |
tree | d400fa641027520fd5ed1319d69c2e9006fb4423 | |
parent | 792b07c61b5a45f7a0a55a96a31b523261f28d24 (diff) | |
download | meson-438f219864df10b6143725acbf574abcd38f9d8f.zip meson-438f219864df10b6143725acbf574abcd38f9d8f.tar.gz meson-438f219864df10b6143725acbf574abcd38f9d8f.tar.bz2 |
gnome: Pass ExternalProgram objects to CustomTarget
There is no need to do obj.get_command() and in fact it's wrong
because the VS backends need to resolve each object to absolute paths
and get_command() does not do that.
This should fix invocation of GNOME module helpers with the VS backends
For the record, absolute paths for programs are needed because the
same PATH environment won't necessarily be available to Visual Studio
when it builds the generated solution.
Related to https://github.com/mesonbuild/meson/issues/1419
-rw-r--r-- | mesonbuild/modules/gnome.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 7c4c42d..8cf89e1 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -379,7 +379,7 @@ class GnomeModule(ExtensionModule): depends = [girtarget] gir_inc_dirs = [] - scan_command = giscanner.get_command() + ['@INPUT@'] + scan_command = [giscanner, '@INPUT@'] scan_command += pkgargs scan_command += ['--no-libtool', '--namespace=' + ns, '--nsversion=' + nsversion, '--warn-all', '--output', '@OUTPUT@'] @@ -535,7 +535,7 @@ class GnomeModule(ExtensionModule): scan_target = GirTarget(girfile, state.subdir, scankwargs) typelib_output = '%s-%s.typelib' % (ns, nsversion) - typelib_cmd = gicompiler.get_command() + [scan_target, '--output', '@OUTPUT@'] + typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@'] typelib_cmd += get_include_args(state.environment, gir_inc_dirs, prefix='--includedir=') for incdir in typelib_includes: @@ -559,7 +559,7 @@ class GnomeModule(ExtensionModule): srcdir = os.path.join(state.build_to_src, state.subdir) outdir = state.subdir - cmd = find_program('glib-compile-schemas', 'gsettings-compile').get_command() + cmd = [find_program('glib-compile-schemas', 'gsettings-compile')] cmd += ['--targetdir', outdir, srcdir] kwargs['command'] = cmd kwargs['input'] = [] @@ -753,7 +753,7 @@ class GnomeModule(ExtensionModule): namebase = args[0] xml_file = args[1] target_name = namebase + '-gdbus' - cmd = find_program('gdbus-codegen', target_name).get_command() + cmd = [find_program('gdbus-codegen', target_name)] if 'interface_prefix' in kwargs: cmd += ['--interface-prefix', kwargs.pop('interface_prefix')] if 'namespace' in kwargs: @@ -811,7 +811,7 @@ class GnomeModule(ExtensionModule): elif arg not in known_custom_target_kwargs: raise MesonException( 'Mkenums does not take a %s keyword argument.' % (arg, )) - cmd = find_program('glib-mkenums', 'mkenums').get_command() + cmd + cmd = [find_program('glib-mkenums', 'mkenums')] + cmd custom_kwargs = {} for arg in known_custom_target_kwargs: if arg in kwargs: @@ -894,7 +894,7 @@ class GnomeModule(ExtensionModule): raise MesonException( 'Sources keyword argument must be a string or array.') - cmd = find_program('glib-genmarshal', output + '_genmarshal').get_command() + cmd = [find_program('glib-genmarshal', output + '_genmarshal')] known_kwargs = ['internal', 'nostdinc', 'skip_source', 'stdinc', 'valist_marshallers'] known_custom_target_kwargs = ['build_always', 'depends', @@ -1023,7 +1023,7 @@ class GnomeModule(ExtensionModule): build_dir = os.path.join(state.environment.get_build_dir(), state.subdir) source_dir = os.path.join(state.environment.get_source_dir(), state.subdir) pkg_cmd, vapi_depends, vapi_packages, vapi_includes = self._extract_vapi_packages(state, kwargs) - cmd = find_program('vapigen', 'Vaapi').get_command() + cmd = [find_program('vapigen', 'Vaapi')] cmd += ['--quiet', '--library=' + library, '--directory=' + build_dir] cmd += self._vapi_args_to_command('--vapidir=', 'vapi_dirs', kwargs) cmd += self._vapi_args_to_command('--metadatadir=', 'metadata_dirs', kwargs) |