mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
meson: Deduplicate generation of wayland-version.h
Signed-off-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
9f9e971f56
commit
6d44973710
1 changed files with 8 additions and 17 deletions
|
|
@ -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_MAJOR', wayland_version[0].to_int())
|
||||||
wayland_version_h.set('WAYLAND_VERSION_MINOR', wayland_version[1].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())
|
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 = static_library(
|
||||||
'wayland-util',
|
'wayland-util',
|
||||||
|
|
@ -18,12 +26,6 @@ wayland_util_dep = declare_dependency(
|
||||||
if get_option('scanner')
|
if get_option('scanner')
|
||||||
# wayland-scanner
|
# wayland-scanner
|
||||||
|
|
||||||
configure_file(
|
|
||||||
input: 'wayland-version.h.in',
|
|
||||||
output: 'wayland-version.h',
|
|
||||||
configuration: wayland_version_h,
|
|
||||||
)
|
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
input: '../protocol/wayland.dtd',
|
input: '../protocol/wayland.dtd',
|
||||||
output: 'wayland.dtd.embed',
|
output: 'wayland.dtd.embed',
|
||||||
|
|
@ -66,17 +68,6 @@ endif
|
||||||
if get_option('libraries')
|
if get_option('libraries')
|
||||||
# wayland 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)
|
mathlib_dep = cc.find_library('m', required: false)
|
||||||
threads_dep = dependency('threads', required: false)
|
threads_dep = dependency('threads', required: false)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue