diff options
author | Kai Kang <kai.kang@windriver.com> | 2018-09-14 01:26:38 -0700 |
---|---|---|
committer | Kai Kang <kai.kang@windriver.com> | 2018-10-08 23:21:55 -0700 |
commit | 3938b86f5289c2b28a5ec42965b8da4b509445c4 (patch) | |
tree | 9ac5fde8e27fba1fd09ed51b873360a1a1c6a89d | |
parent | 3301c7e11e79235a38edddc87c849d60416e7579 (diff) | |
download | gobject-introspection-3938b86f5289c2b28a5ec42965b8da4b509445c4.tar.gz |
meson: add option 'gir-dir-prefix'
Add option 'gir-dir-prefix' for meson to make the installation path of
.gir files could be configured which has been done for autoconf.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
-rw-r--r-- | gir/meson.build | 1 | ||||
-rw-r--r-- | meson.build | 8 | ||||
-rw-r--r-- | meson_options.txt | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gir/meson.build b/gir/meson.build index 607bbc45..1cb514a1 100644 --- a/gir/meson.build +++ b/gir/meson.build @@ -34,7 +34,6 @@ gir_files = [ ] typelibdir = join_paths(get_option('libdir'), 'girepository-1.0') -girdir = join_paths(get_option('datadir'), 'gir-1.0') install_data(gir_files, install_dir: girdir) scanner_command = [ diff --git a/meson.build b/meson.build index 3f5d970d..78585a90 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,12 @@ python = pymod.find_installation(get_option('python')) cc = meson.get_compiler('c') config = configuration_data() config.set_quoted('GIR_SUFFIX', 'gir-1.0') -config.set_quoted('GIR_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'gir-1.0')) +gir_dir_prefix = get_option('gir-dir-prefix') +if gir_dir_prefix == '' + gir_dir_prefix = get_option('datadir') +endif +girdir = join_paths(get_option('prefix'), gir_dir_prefix, 'gir-1.0') +config.set_quoted('GIR_DIR', girdir) config.set_quoted('GOBJECT_INTROSPECTION_LIBDIR', join_paths(get_option('prefix'), get_option('libdir'))) foreach type : ['char', 'short', 'int', 'long'] @@ -93,6 +98,7 @@ pkgconfig_conf.set('libdir', join_paths('${prefix}', get_option('libdir'))) pkgconfig_conf.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) pkgconfig_conf.set('datadir', '${datarootdir}') pkgconfig_conf.set('includedir', join_paths('${prefix}', get_option('includedir'))) +pkgconfig_conf.set('GIR_DIR', join_paths('${prefix}', gir_dir_prefix, 'gir-1.0')) if host_system == 'windows' or host_system == 'cygwin' pkgconfig_conf.set('EXEEXT', '.exe') else diff --git a/meson_options.txt b/meson_options.txt index 49726be6..ee6958dd 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -21,3 +21,7 @@ option('cairo-libname', type: 'string', option('python', type: 'string', value: 'python3', description: 'Path or name of the Python interpreter to build for' ) + +option('gir-dir-prefix', type: 'string', + description: 'Intermediate prefix for gir installation under ${prefix}' +) |