diff options
author | RaviRahar <ravirahar33@gmail.com> | 2024-07-19 11:53:56 +0530 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2024-07-19 08:19:18 -0700 |
commit | 96f20d5b372b9982c153b114eb3726fbbecb7542 (patch) | |
tree | a3bc72c1be49504e8bf4ac6cc2647d7eb9e28415 | |
parent | 7a306e1a46a91dadb77656a6998a8dcaa6482b8f (diff) | |
download | meson-96f20d5b372b9982c153b114eb3726fbbecb7542.zip meson-96f20d5b372b9982c153b114eb3726fbbecb7542.tar.gz meson-96f20d5b372b9982c153b114eb3726fbbecb7542.tar.bz2 |
modules/gnome: gnome.compile_resources() must have 'install_dir' if installing
Since they do not implement a default install dir like BuildTargets do.
gnome.compile_resources() would result in an unhandled python exception
when missing install_dir argument together with providing following arguments:
gresource_bundle: true
install: true
closes: https://github.com/mesonbuild/meson/issues/13447
Signed-off-by: RaviRahar <ravirahar33@gmail.com>
-rw-r--r-- | mesonbuild/modules/gnome.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 37a8b51..24ab50e 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -479,8 +479,11 @@ class GnomeModule(ExtensionModule): else: raise MesonException('Compiling GResources into code is only supported in C and C++ projects') - if kwargs['install'] and not gresource: - raise MesonException('The install kwarg only applies to gresource bundles, see install_header') + if kwargs['install']: + if not gresource: + raise MesonException('The install kwarg only applies to gresource bundles, see install_header') + elif not kwargs['install_dir']: + raise MesonException('gnome.compile_resources: "install_dir" keyword argument must be set when "install" is true.') install_header = kwargs['install_header'] if install_header and gresource: |