[template-glib] build: Simply subproject subdirectory support
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [template-glib] build: Simply subproject subdirectory support
- Date: Fri, 9 Jun 2017 22:32:19 +0000 (UTC)
commit 920a201b670617c1c5a2b4dfff028ea64886453c
Author: Patrick Griffis <tingping tingping se>
Date: Fri Jun 9 18:31:26 2017 -0400
build: Simply subproject subdirectory support
meson.build | 19 ++++++++-----------
meson_options.txt | 16 ++--------------
src/meson.build | 2 +-
3 files changed, 11 insertions(+), 26 deletions(-)
---
diff --git a/meson.build b/meson.build
index e2d2fef..7f8582f 100644
--- a/meson.build
+++ b/meson.build
@@ -83,18 +83,15 @@ add_project_arguments(
)
# Setup various paths that subdirectory meson.build files need
-if meson.is_subproject()
- girdir = get_option('pkggirdir')
- typelibdir = get_option('pkgtypelibdir')
- libdir = get_option('pkglibdir')
- vapidir = get_option('pkgvapidir')
- includedir = get_option('pkgincludedir')
-else
- libdir = get_option('libdir')
- includedir = get_option('includedir')
- girdir = join_paths(get_option('datadir'), 'gir-1.0')
- typelibdir = join_paths(get_option('libdir'), 'girepository-1.0')
+package_subdir = get_option('package_subdir')
+libdir = join_paths(get_option('libdir'), package_subdir)
+includedir = join_paths(get_option('includedir'), package_subdir)
+girdir = join_paths(get_option('datadir'), package_subdir, 'gir-1.0')
+typelibdir = join_paths(get_option('libdir'), package_subdir, 'girepository-1.0')
+if package_subdir == ''
vapidir = join_paths(get_option('datadir'), 'vala', 'vapi')
+else
+ vapidir = join_paths(get_option('datadir'), package_subdir, 'vapi')
endif
gnome = import('gnome')
diff --git a/meson_options.txt b/meson_options.txt
index db71728..94f72c7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,20 +8,8 @@ option('with_introspection', type: 'boolean', value: true)
option('with_vapi', type: 'boolean', value: true)
# For subproject usage
-option('pkggirdir', type: 'string',
- description: 'Private directory used when built as a subproject'
-)
-option('pkgvapidir', type: 'string',
- description: 'Private directory used when built as a subproject'
-)
-option('pkglibdir', type: 'string',
- description: 'Private directory used when built as a subproject'
-)
-option('pkgtypelibdir', type: 'string',
- description: 'Private directory used when built as a subproject'
-)
-option('pkgincludedir', type: 'string',
- description: 'Private directory used when built as a subproject'
+option('package_subdir', type: 'string',
+ description: 'Private sub-directory used when built as a subproject'
)
option('enable-gtk-doc',
diff --git a/src/meson.build b/src/meson.build
index 860aba7..3712539 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -202,7 +202,7 @@ pkgg = import('pkgconfig')
pkgg.generate(
libraries: [libtemplate_glib],
- subdirs: 'template-glib-@0@'.format(apiversion),
+ subdirs: join_paths(package_subdir, libtemplate_glib_header_subdir),
version: meson.project_version(),
name: 'Template-GLib',
filebase: 'template-glib-@0@'.format(apiversion),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]