From df587aa10005475a1a9300001e7045b1ba357b9e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 27 Apr 2019 05:12:18 +0300 Subject: libcamera: Make libudev optional libcamera depends on libudev for device enumeration. It is however useful to allow building documentation without requiring the dependency to be installed. Make the libudev dependency optional and compile the udev-based device enumerator out when libudev is not present. Note that while libcamera will compile without libudev, it will not be able to enumerate devices. A sysfs-based device enumerator is planned as a fallback but not implemented yet. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 3434dd7c..d272ff33 100644 --- a/meson.build +++ b/meson.build @@ -19,7 +19,6 @@ config_h = configuration_data() if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix: '#define _GNU_SOURCE') config_h.set('HAVE_SECURE_GETENV', 1) endif -configure_file(output: 'config.h', configuration: config_h) common_arguments = [ '-Wno-unused-parameter', @@ -49,6 +48,8 @@ if get_option('tests') subdir('test') endif +configure_file(output: 'config.h', configuration: config_h) + pkg_mod = import('pkgconfig') pkg_mod.generate(libraries : libcamera, version : '1.0', -- cgit v1.2.1