summaryrefslogtreecommitdiff
path: root/include/libcamera/meson.build
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-21 19:13:44 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-23 13:56:36 +0300
commit90de3690c45655d12260ce5879358552f4824c88 (patch)
treebb0baa2f4a2c3e416a2616e5b66e81383262a54e /include/libcamera/meson.build
parent3fac104158fcbdd7d6d7ffb34e5db77f1f9ebeb5 (diff)
libcamera: Auto-generate libcamera.h
As shown by two missing includes, keeping the libcamera.h file in sync when adding or removing headers is an error-prone manual process. Automate it by generating the header automatically. The libcamera.h header is also added to the libcamera dependency libcamera_dep to ensure that the headers gets generated before any source depending on it gets compiled. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include/libcamera/meson.build')
-rw-r--r--include/libcamera/meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index cb64f0ca..1fcf6b50 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -6,7 +6,6 @@ libcamera_api = files([
'event_notifier.h',
'geometry.h',
'ipa/ipa_module_info.h',
- 'libcamera.h',
'object.h',
'request.h',
'signal.h',
@@ -14,5 +13,14 @@ libcamera_api = files([
'timer.h',
])
+gen_header = join_paths(meson.current_source_dir(), 'gen-header.sh')
+
+libcamera_h = custom_target('gen-header',
+ input : 'meson.build',
+ output : 'libcamera.h',
+ command : [gen_header, meson.current_source_dir(), '@OUTPUT@'],
+ install : true,
+ install_dir : 'include/libcamera')
+
install_headers(libcamera_api,
subdir : 'libcamera')