build: override dependency for use as subproject
authorSimon Ser <contact@emersion.fr>
Fri, 9 Dec 2022 10:17:33 +0000 (11:17 +0100)
committerSimon Ser <contact@emersion.fr>
Fri, 9 Dec 2022 10:17:33 +0000 (11:17 +0100)
Allows e.g. compositors to setup libinput as a subproject. Makes
it easier to ad support for libinput features which haven't been
released yet.

Signed-off-by: Simon Ser <contact@emersion.fr>
meson.build

index fda3e7a819a9f21fca2b4808cdf04e041de70bc8..80456bc0fa2eadbd6769fe20e0d5b05534ac1064 100644 (file)
@@ -401,6 +401,10 @@ dep_libinput = declare_dependency(
                link_with : lib_libinput,
                dependencies : deps_libinput)
 
+if meson.version().version_compare('>= 0.54.0')
+       meson.override_dependency('libinput', dep_libinput)
+endif
+
 pkgconfig.generate(
        filebase : 'libinput',
        name : 'Libinput',