From 10e1cd76aa52c5200b2c0127ab359cf3e7393314 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Mon, 29 Jul 2024 14:29:53 +0000 Subject: [PATCH] Don't build SPI driver on non-Linux Doesn't build on other operating systems. With auto-detection we don't have to manually select all other drivers. Signed-off-by: Daniel Schaefer --- libfprint/meson.build | 6 +++--- meson.build | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/libfprint/meson.build b/libfprint/meson.build index 55dcf3fb..b246720c 100644 --- a/libfprint/meson.build +++ b/libfprint/meson.build @@ -1,9 +1,9 @@ +spi_sources = [] +spi_headers = [] + if 'elanspi' in drivers spi_headers = ['fpi-spi-transfer.h'] spi_sources = ['fpi-spi-transfer.c'] -else - spi_sources = [] - spi_headers = [] endif libfprint_sources = [ diff --git a/meson.build b/meson.build index 28ee27a2..e9a09c99 100644 --- a/meson.build +++ b/meson.build @@ -135,11 +135,13 @@ default_drivers = [ 'fpcmoc', 'realtek', 'focaltech_moc', - - # SPI - 'elanspi', ] +# SPI +if host_machine.system() == 'linux' + default_drivers += ['elanspi'] +endif + # FIXME: All the drivers should be fixed by adjusting the byte order. # See https://gitlab.freedesktop.org/libfprint/libfprint/-/issues/236 endian_independent_drivers = virtual_drivers + [