From 43e35db26aff6a92eacb8973f3d247933df5ce61 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 31 Jul 2018 10:22:31 +1000 Subject: [PATCH] doc/user: add a note on meson's dependency() in the building docs See #96 Signed-off-by: Peter Hutterer --- doc/user/building.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/user/building.rst b/doc/user/building.rst index 5eeb540d..96d98b5c 100644 --- a/doc/user/building.rst +++ b/doc/user/building.rst @@ -303,8 +303,16 @@ Building against libinput libinput provides a `pkg-config `_ file. -Software that uses libinput should use pkg-config and the -``PKG_CHECK_MODULES`` autoconf macro. +Software that uses autotools should use the ``PKG_CHECK_MODULES`` autoconf +macro: :: + + PKG_CHECK_MODULES(LIBINPUT, "libinput") + +Software that uses meson should use the ``dependency()`` function: :: + + pkgconfig = import('pkgconfig') + dep_libinput = dependency('libinput') + Otherwise, the most rudimentary way to compile and link a program against libinput is: