summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-12-14 23:17:31 +0000
committerDaniel Scally <dan.scally@ideasonboard.com>2023-01-16 13:10:15 +0000
commit3f6aee6a13233e9ffcbb133ab9490aead7e2ced3 (patch)
treeb6aef69b052c7f77286d1842be14f03520af7782 /meson.build
parent006aa232ac92e3ccde06a3b1536d6e02e8496766 (diff)
main: Provide a libcamera source
Allow callers to create a libcamera source when available. libcamera support is optional, so conditionally compile the new options depending on whether libcamera is available. Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c928170..8101676 100644
--- a/meson.build
+++ b/meson.build
@@ -55,6 +55,15 @@ cc = meson.get_compiler('c')
libcamera = dependency('libcamera', required : false)
+conf = configuration_data()
+
+if libcamera.found()
+ conf.set('HAVE_LIBCAMERA', true)
+endif
+
+configure_file(output : 'config.h', configuration : conf)
+config_includes = include_directories('.')
+
subdir('include')
subdir('lib')