summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-01-27 15:57:14 +0100
committerOlivier Fourdan <fourdan@gmail.com>2023-02-13 16:14:19 +0000
commitc06ba33280f0170dcba9569575062feec722a67a (patch)
tree1906702afba7368f1ef9a1b89af99e81ef4e4786
parent0c93394d726131b1badcdc1d8ca8c8fe8037d85c (diff)
downloadxserver-c06ba33280f0170dcba9569575062feec722a67a.tar.gz
xwayland: generate pkg-config file from Meson
Remove the xwayland.pc.in file: - This avoids writing down each pkg-config variable twice: once in the Meson files to set the configuration data, once in the .pc.in file to print it. - We'll be able to re-use the same variables for use as a subproject. Signed-off-by: Simon Ser <contact@emersion.fr>
-rw-r--r--hw/xwayland/meson.build38
-rw-r--r--hw/xwayland/xwayland.pc.in20
2 files changed, 23 insertions, 35 deletions
diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build
index 6dddfd63e..593faaa5c 100644
--- a/hw/xwayland/meson.build
+++ b/hw/xwayland/meson.build
@@ -159,21 +159,29 @@ xwayland_server = executable(
install_dir: xwayland_path
)
-xwayland_data = configuration_data()
-xwayland_data.set('prefix', get_option('prefix'))
-xwayland_data.set('exec_prefix', '${prefix}')
-xwayland_data.set('PACKAGE_VERSION', meson.project_version())
-xwayland_data.set('xwayland_path', xwayland_path)
-xwayland_data.set('have_glamor', build_glamor ? 'true' : 'false')
-xwayland_data.set('have_eglstream', build_eglstream ? 'true' : 'false')
-xwayland_data.set('have_libdecor', have_libdecor ? 'true' : 'false')
-configure_file(
- input: 'xwayland.pc.in',
- output: 'xwayland.pc',
- configuration: xwayland_data,
- install_dir: join_paths(get_option('prefix'),
- get_option('libdir'),
- 'pkgconfig'),
+pkgconfig = import('pkgconfig')
+
+pkgconfig.generate(
+ filebase: 'xwayland',
+ name: 'Xwayland',
+ description: 'X Server for Wayland',
+ variables: [
+ 'exec_prefix=${prefix}',
+ 'xwayland=' + xwayland_path + '/Xwayland',
+ 'have_glamor=' + build_glamor.to_string(),
+ 'have_eglstream=' + build_eglstream.to_string(),
+ 'have_initfd=true',
+ 'have_listenfd=true',
+ 'have_verbose=true',
+ 'have_terminate_delay=true',
+ 'have_no_touch_pointer_emulation=true',
+ 'have_force_xrandr_emulation=true',
+ 'have_geometry=true',
+ 'have_fullscreen=true',
+ 'have_host_grab=true',
+ 'have_decorate=' + have_libdecor.to_string(),
+ 'have_byteswappedclients=true',
+ ],
)
xwayland_manpage = configure_file(
diff --git a/hw/xwayland/xwayland.pc.in b/hw/xwayland/xwayland.pc.in
deleted file mode 100644
index d65d52e51..000000000
--- a/hw/xwayland/xwayland.pc.in
+++ /dev/null
@@ -1,20 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-Name: Xwayland
-Description: X Server for Wayland
-Version: @PACKAGE_VERSION@
-xwayland=@xwayland_path@/Xwayland
-have_glamor=@have_glamor@
-have_eglstream=@have_eglstream@
-have_initfd=true
-have_listenfd=true
-have_verbose=true
-have_terminate_delay=true
-have_no_touch_pointer_emulation=true
-have_force_xrandr_emulation=true
-have_geometry=true
-have_fullscreen=true
-have_host_grab=true
-have_decorate=@have_libdecor@
-have_byteswappedclients=true