build: override dependency for use as subproject

This allows xkbcommon to be used as a subproject.

Signed-off-by: Simon Ser <contact@emersion.fr>
master
Simon Ser 2023-02-18 11:01:30 +01:00 committed by Ran Benita
parent c6ff79d5c1
commit 5b5ec0ee27
1 changed files with 9 additions and 0 deletions

View File

@ -266,6 +266,9 @@ dep_libxkbcommon = declare_dependency(
link_with: libxkbcommon,
include_directories: include_directories('include'),
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('xkbcommon', dep_libxkbcommon)
endif
pkgconfig.generate(
libxkbcommon,
name: 'xkbcommon',
@ -334,6 +337,9 @@ You can disable X11 support with -Denable-x11=false.''')
link_with: libxkbcommon_x11,
include_directories: include_directories('include'),
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('xkbcommon-x11', dep_libxkbcommon_x11)
endif
pkgconfig.generate(
libxkbcommon_x11,
name: 'xkbcommon-x11',
@ -398,6 +404,9 @@ if get_option('enable-xkbregistry')
link_with: libxkbregistry,
include_directories: include_directories('include'),
)
if meson.version().version_compare('>= 0.54.0')
meson.override_dependency('xkbregistry', dep_libxkbregistry)
endif
endif
man_pages = []