mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-30 16:30:16 +01:00
tools: setenv the quirks dir when running from the build directory
Fixes #84 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ad5d2fef72
commit
c7a9b2064d
1 changed files with 9 additions and 0 deletions
|
|
@ -311,6 +311,13 @@ tools_open_device(const char *path, bool verbose, bool *grab)
|
|||
return li;
|
||||
}
|
||||
|
||||
static void
|
||||
tools_setenv_quirks_dir(void)
|
||||
{
|
||||
if (tools_execdir_is_builddir(NULL, 0))
|
||||
setenv("LIBINPUT_QUIRKS_DIR", LIBINPUT_QUIRKS_SRCDIR, 0);
|
||||
}
|
||||
|
||||
struct libinput *
|
||||
tools_open_backend(enum tools_backend which,
|
||||
const char *seat_or_device,
|
||||
|
|
@ -319,6 +326,8 @@ tools_open_backend(enum tools_backend which,
|
|||
{
|
||||
struct libinput *li;
|
||||
|
||||
tools_setenv_quirks_dir();
|
||||
|
||||
switch (which) {
|
||||
case BACKEND_UDEV:
|
||||
li = tools_open_udev(seat_or_device, verbose, grab);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue