Commit 920a201b authored by Patrick Griffis's avatar Patrick Griffis

build: Simply subproject subdirectory support

parent 2c0efb5d
......@@ -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')
......
......@@ -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',
......
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment