diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/libcamera/gen-header.sh | 27 | ||||
-rw-r--r-- | include/libcamera/libcamera.h | 20 | ||||
-rw-r--r-- | include/libcamera/meson.build | 10 |
3 files changed, 36 insertions, 21 deletions
diff --git a/include/libcamera/gen-header.sh b/include/libcamera/gen-header.sh new file mode 100755 index 00000000..e171c08c --- /dev/null +++ b/include/libcamera/gen-header.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +src_dir="$1" +dst_file="$2" + +cat <<EOF > "$dst_file" +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* This file is auto-generated, do not edit! */ +/* + * Copyright (C) 2018-2019, Google Inc. + * + * libcamera.h - libcamera public API + */ +#ifndef __LIBCAMERA_LIBCAMERA_H__ +#define __LIBCAMERA_LIBCAMERA_H__ + +EOF + +for header in "$src_dir"/*.h ; do + header=$(basename "$header") + echo "#include <libcamera/$header>" >> "$dst_file" +done + +cat <<EOF >> "$dst_file" + +#endif /* __LIBCAMERA_LIBCAMERA_H__ */ +EOF diff --git a/include/libcamera/libcamera.h b/include/libcamera/libcamera.h deleted file mode 100644 index dda576e9..00000000 --- a/include/libcamera/libcamera.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2018, Google Inc. - * - * libcamera.h - libcamera public API - */ -#ifndef __LIBCAMERA_LIBCAMERA_H__ -#define __LIBCAMERA_LIBCAMERA_H__ - -#include <libcamera/buffer.h> -#include <libcamera/camera.h> -#include <libcamera/camera_manager.h> -#include <libcamera/event_dispatcher.h> -#include <libcamera/event_notifier.h> -#include <libcamera/request.h> -#include <libcamera/signal.h> -#include <libcamera/stream.h> -#include <libcamera/timer.h> - -#endif /* __LIBCAMERA_LIBCAMERA_H__ */ 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') |