summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-11-17 12:57:54 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-12-14 00:20:40 +0000
commitd9188a7750c99ce9f3d9e0e2aea93f86491e0cb6 (patch)
tree7ea7486ae4ca8915bd8d69f901f96c7ec9466667 /meson.build
parent9324e4f054fa4d7c213400545e8fa6b42392c5a5 (diff)
downloaddrm-d9188a7750c99ce9f3d9e0e2aea93f86491e0cb6.tar.gz
meson: add override_dependency when possible
This allows consumers of libdrm as a subproject to use the simpler `dependency('libdrm', fallback : 'libdrm')` syntax, as the libdrm build files already tell meson that they override a dependency called "libdrm". Signed-off-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 62dec8dd..f5704cf1 100644
--- a/meson.build
+++ b/meson.build
@@ -340,6 +340,10 @@ ext_libdrm = declare_dependency(
include_directories : [inc_root, inc_drm],
)
+if meson.version().version_compare('>= 0.54.0')
+ meson.override_dependency('libdrm', ext_libdrm)
+endif
+
install_headers('libsync.h', 'xf86drm.h', 'xf86drmMode.h')
install_headers(
'include/drm/drm.h', 'include/drm/drm_fourcc.h', 'include/drm/drm_mode.h',