gnome module: fix install_dir x3, by allowing false *_gir and *_typelib

generate_gir forces building both the typelib and gir, and some people
only want one or the other (probably only the typelib?) which means
flagging the other as install_dir: false in the same way custom_target
supports.

As this always worked, albeit undocumented, make sure it keeps working.
It's pretty reasonable to allow, anyway.

Fixes https://github.com/mesonbuild/meson/pull/9484#issuecomment-980131791
pull/9667/head
Eli Schwartz 3 years ago
parent 5e9b709ad0
commit 3074bb14a1
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 12
      mesonbuild/modules/gnome.py

@ -746,9 +746,11 @@ class GnomeModule(ExtensionModule):
'depends': depends}
if 'install' in kwargs:
scankwargs['install'] = kwargs['install']
scankwargs['install_dir'] = kwargs.get('install_dir_gir',
install_dir = kwargs.get('install_dir_gir',
os.path.join(state.environment.get_datadir(), 'gir-1.0'))
if install_dir is not False:
scankwargs['install_dir'] = install_dir
scankwargs['install'] = kwargs['install']
scankwargs['install_tag'] = 'devel'
if 'build_by_default' in kwargs:
@ -764,9 +766,11 @@ class GnomeModule(ExtensionModule):
}
if 'install' in kwargs:
typelib_kwargs['install'] = kwargs['install']
typelib_kwargs['install_dir'] = kwargs.get('install_dir_typelib',
install_dir = kwargs.get('install_dir_typelib',
os.path.join(state.environment.get_libdir(), 'girepository-1.0'))
if install_dir is not False:
typelib_kwargs['install'] = kwargs['install']
typelib_kwargs['install_dir'] = install_dir
typelib_kwargs['install_tag'] = 'typelib'
if 'build_by_default' in kwargs:

Loading…
Cancel
Save