Commit 96c0ad8b authored by Felipe Borges's avatar Felipe Borges 👣

build: Allow building as a git submodule

parent 0fb4c307
......@@ -15,11 +15,16 @@ add_project_arguments([
'-I' + meson.build_root(),
], language: 'c')
package_subdir = get_option('package_subdir')
datadir = get_option('datadir')
libdir = get_option('libdir')
girdir = join_paths(datadir, 'gir-1.0')
typelibdir = join_paths(libdir, 'girepository-1.0')
vapidir = join_paths(datadir, 'vala', 'vapi')
libdir = join_paths(get_option('libdir'), package_subdir)
girdir = join_paths(datadir, package_subdir, 'gir-1.0')
typelibdir = join_paths(libdir, package_subdir, 'girepository-1.0')
if package_subdir != ''
vapidir = join_paths(datadir, package_subdir, 'vapi')
else
vapidir = join_paths(datadir, 'vala', 'vapi')
endif
gnome = import('gnome')
......
# Subproject
option('package_subdir', type: 'string',
description: 'Subdirectory to append to all installed files, for use as subproject'
)
......@@ -22,12 +22,15 @@ version_conf.set('MAJOR_VERSION', MAJOR_VERSION)
version_conf.set('MINOR_VERSION', MINOR_VERSION)
version_conf.set('MICRO_VERSION', MICRO_VERSION)
gtk_frdp_header_subdir = join_paths(package_subdir, 'gtk-frdp')
gtk_frdp_header_dir = join_paths(get_option('includedir'), gtk_frdp_header_subdir)
configure_file(
input: 'gtk-frdp-version.h.in',
output: 'gtk-frdp-version.h',
configuration: version_conf,
install: true,
install_dir: join_paths(get_option('includedir'), 'gtk-frdp')
install_dir: gtk_frdp_header_dir
)
cc = meson.get_compiler('c')
......
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