summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-02-07 14:03:18 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-02-14 11:38:05 +0000
commit357c5a034a89dc227d671e63e8c10c4c62f9201e (patch)
treec2351d54e2d1b602a6d635d46a11b26bb65d33b7 /meson.build
parent405a475fa64594e3f11e8d0db39be164bdf3cd86 (diff)
meson.build: Allow to install the private extension
This way clients can use wayland-scanner to generate their client headers, and do not need to copy manually the extension. Also, generate a pkgconfig file otherwise clients will have a hard time finding the proper pkgdatadir path in order to get the agl-shell xml file. Bug-AGL: SPEC-3167 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Id62e49b57c8864e0bdb695c03198eac782efcbeb
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build23
1 files changed, 23 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 294d82f..e3a6631 100644
--- a/meson.build
+++ b/meson.build
@@ -10,6 +10,8 @@ project('agl-compositor',
)
config_h = configuration_data()
+agl_compositor_version = '0.0.13'
+pkgconfig = import('pkgconfig')
cc = meson.get_compiler('c')
add_project_arguments(
@@ -100,6 +102,10 @@ else
local_dep = []
endif
+dir_data = join_paths(prefix_path, get_option('datadir'))
+dir_data_agl_compositor = join_paths('agl-compositor', 'protocols')
+dir_data_pc = join_paths(dir_data, 'pkgconfig')
+
deps_libweston = [
dependency('wayland-server'),
dependency('libweston-6'),
@@ -136,3 +142,20 @@ exe_agl_compositor = executable(
dependencies: deps_libweston,
install: true
)
+
+pkgconfig.generate(
+ filebase: 'agl-compositor-@0@-protocols'.format(agl_compositor_version),
+ name: 'agl-compositor private protocols',
+ version: agl_compositor_version,
+ description: 'agl-compositor protocol files',
+ variables: [
+ 'datarootdir=' + join_paths('${prefix}', get_option('datadir')),
+ 'pkgdatadir=' + join_paths('${pc_sysrootdir}${datarootdir}', dir_data_agl_compositor)
+ ],
+ install_dir: dir_data_pc
+)
+
+install_data(
+ [ agl_shell_xml ],
+ install_dir: join_paths(dir_data, dir_data_agl_compositor)
+)