summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-10-10 13:24:09 +0200
committerCarlos Garnacho <carlosg@gnome.org>2018-10-10 13:59:47 +0200
commit250afc2e1d614cd7ab852ba4278194468ced09e1 (patch)
treec9835d54680ecfe02e5ee3af11f0918081d128cb /meson.build
parent65f7051bda63ec2ad50a42334b95ea22790f7eec (diff)
downloadgobject-introspection-250afc2e1d614cd7ab852ba4278194468ced09e1.tar.gz
build: Make girdir in .pc files relative to ${datadir} by default
This was the de facto behavior, and is already relied upon. If gir-dir-prefix is specified, the gir dir will rely on the more generic ${prefix} location. Also, avoid expanding the path unless necessary in the autotools build. https://gitlab.gnome.org/GNOME/gobject-introspection/issues/236
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 7 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 78585a90..4022e319 100644
--- a/meson.build
+++ b/meson.build
@@ -20,9 +20,13 @@ config = configuration_data()
config.set_quoted('GIR_SUFFIX', 'gir-1.0')
gir_dir_prefix = get_option('gir-dir-prefix')
if gir_dir_prefix == ''
- gir_dir_prefix = get_option('datadir')
+ gir_dir_prefix = join_paths(get_option('prefix'), get_option('datadir'))
+ gir_dir_pc_prefix = '${datadir}'
+else
+ gir_dir_prefix = join_paths(get_option('prefix'), gir_dir_prefix)
+ gir_dir_pc_prefix = join_paths('${prefix}', gir_dir_prefix)
endif
-girdir = join_paths(get_option('prefix'), gir_dir_prefix, 'gir-1.0')
+girdir = join_paths(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')))
@@ -98,7 +102,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'))
+pkgconfig_conf.set('GIR_PC_DIR', join_paths(gir_dir_pc_prefix, 'gir-1.0'))
if host_system == 'windows' or host_system == 'cygwin'
pkgconfig_conf.set('EXEEXT', '.exe')
else