mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
meson: override dependencies to ease use as subproject
Make it easier to use Wayland as a Meson subproject by overriding
dependencies we define. This allows to easily build Wayland as a
subproject like so:
subproject('wayland', required: false, default_options: ['documentation=false'])
After this statement, the wayland-* dependencies will use the subproject
instead of the system if available.
Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
28c2d8321b
commit
ba82e0d806
3 changed files with 26 additions and 0 deletions
|
|
@ -36,3 +36,12 @@ pkgconfig.generate(
|
||||||
libraries: wayland_cursor,
|
libraries: wayland_cursor,
|
||||||
filebase: 'wayland-cursor',
|
filebase: 'wayland-cursor',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
wayland_cursor_dep = declare_dependency(
|
||||||
|
link_with: wayland_cursor,
|
||||||
|
include_directories: [ root_inc, include_directories('.') ],
|
||||||
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('wayland-cursor', wayland_cursor_dep)
|
||||||
|
endif
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,12 @@ pkgconfig.generate(
|
||||||
description: 'Backend wayland-egl interface',
|
description: 'Backend wayland-egl interface',
|
||||||
version: '3'
|
version: '3'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
wayland_egl_dep = declare_dependency(
|
||||||
|
link_with: wayland_egl,
|
||||||
|
include_directories: [ root_inc, include_directories('.') ],
|
||||||
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('wayland-egl', wayland_egl_dep)
|
||||||
|
endif
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,10 @@ if get_option('libraries')
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('wayland-server', wayland_server_dep)
|
||||||
|
endif
|
||||||
|
|
||||||
wayland_client = library(
|
wayland_client = library(
|
||||||
'wayland-client',
|
'wayland-client',
|
||||||
sources: [
|
sources: [
|
||||||
|
|
@ -251,6 +255,10 @@ if get_option('libraries')
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if meson.version().version_compare('>= 0.54.0')
|
||||||
|
meson.override_dependency('wayland-client', wayland_client_dep)
|
||||||
|
endif
|
||||||
|
|
||||||
install_headers([
|
install_headers([
|
||||||
'wayland-util.h',
|
'wayland-util.h',
|
||||||
'wayland-server.h',
|
'wayland-server.h',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue