aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2020-03-16 16:47:05 -0700
committerMatt Turner <mattst88@gmail.com>2020-03-18 13:37:25 -0700
commit6d4497371014cacbf0dc4ed9983fd6617ec25c9a (patch)
tree40a3a9bc55df68e7da84f4677acb1c04882d9996
parentmeson: Raise requirement to meson >= 0.52.1 (diff)
downloadwayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.tar
wayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.tar.gz
wayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.tar.bz2
wayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.tar.lz
wayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.tar.xz
wayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.tar.zst
wayland-6d4497371014cacbf0dc4ed9983fd6617ec25c9a.zip
meson: Deduplicate generation of wayland-version.h
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/meson.build25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/meson.build b/src/meson.build
index a61d40f..2d1485c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -4,6 +4,14 @@ wayland_version_h.set('WAYLAND_VERSION', meson.project_version())
wayland_version_h.set('WAYLAND_VERSION_MAJOR', wayland_version[0].to_int())
wayland_version_h.set('WAYLAND_VERSION_MINOR', wayland_version[1].to_int())
wayland_version_h.set('WAYLAND_VERSION_MICRO', wayland_version[2].to_int())
+configure_file(
+ input: 'wayland-version.h.in',
+ output: 'wayland-version.h',
+ configuration: wayland_version_h,
+ install: get_option('libraries'),
+ install_dir: join_paths(get_option('prefix'), get_option('includedir'))
+)
+
wayland_util = static_library(
'wayland-util',
@@ -19,12 +27,6 @@ if get_option('scanner')
# wayland-scanner
configure_file(
- input: 'wayland-version.h.in',
- output: 'wayland-version.h',
- configuration: wayland_version_h,
- )
-
- configure_file(
input: '../protocol/wayland.dtd',
output: 'wayland.dtd.embed',
copy: true
@@ -66,17 +68,6 @@ endif
if get_option('libraries')
# wayland libraries
- # Duplicated inside the "if get_option('scanner')" block above since we
- # still need the wayland-version.h to build the scanner, but do not want
- # to install it. Meson 0.50 adds "install: bool" which will let us
- # deduplicate this block.
- configure_file(
- input: 'wayland-version.h.in',
- output: 'wayland-version.h',
- configuration: wayland_version_h,
- install_dir: join_paths(get_option('prefix'), get_option('includedir'))
- )
-
mathlib_dep = cc.find_library('m', required: false)
threads_dep = dependency('threads', required: false)