[libcamera-devel] [PATCH 2/2] include: Install include files
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Nov 27 02:22:55 CET 2018
Hi Kieran,
Thank you for the patch.
On Monday, 26 November 2018 16:01:11 EET Kieran Bingham wrote:
> The include directory was defined but not installed.
>
> Add it to the meson build structure to incorporate it as part of the
> library install.
>
> To facilitate the same include paths in our internal includes, update
> the structure for headers to match the install structure.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> ---
>
> DESTDIR=/tmp/install/libcamera ninja install
>
> /tmp/install/libcamera/
> └── usr
> └── local
> ├── include
> │ └── libcamera
> │ └── libcamera.h
> ├── lib
> │ └── x86_64-linux-gnu
> │ ├── libcamera.so
> │ └── pkgconfig
> │ └── camera.pc
> └── share
> └── doc
> └── libcamera-0.1
> └── html
>
> include/{ => libcamera}/libcamera.h | 0
> include/libcamera/meson.build | 6 ++++++
> include/meson.build | 1 +
> meson.build | 1 +
> test/init.cpp | 2 +-
> 5 files changed, 9 insertions(+), 1 deletion(-)
> rename include/{ => libcamera}/libcamera.h (100%)
> create mode 100644 include/libcamera/meson.build
> create mode 100644 include/meson.build
>
> diff --git a/include/libcamera.h b/include/libcamera/libcamera.h
> similarity index 100%
> rename from include/libcamera.h
> rename to include/libcamera/libcamera.h
> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
> new file mode 100644
> index 000000000000..d30356af112a
> --- /dev/null
> +++ b/include/libcamera/meson.build
> @@ -0,0 +1,6 @@
> +public_api = [
> + 'libcamera.h',
> +]
> +
> +install_headers(public_api,
> + subdir : 'libcamera')
Is there any way to locate this file one folder up (in include/) and use
wildcards for public_api ?
As commented for a previous patch, I'm still worried about using spaces and
tabs for indentation.
The rest looks good to me, so with this fixed,
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> diff --git a/include/meson.build b/include/meson.build
> new file mode 100644
> index 000000000000..4ce9668caa7b
> --- /dev/null
> +++ b/include/meson.build
> @@ -0,0 +1 @@
> +subdir('libcamera')
> diff --git a/meson.build b/meson.build
> index 434aa557b8a1..494193483079 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -10,6 +10,7 @@ api_version = '0.1'
> inc = include_directories('include')
>
> subdir('Documentation')
> +subdir('include')
> subdir('lib')
> subdir('test')
> subdir('utils')
> diff --git a/test/init.cpp b/test/init.cpp
> index 182728d349a3..8c8ec9adfb83 100644
> --- a/test/init.cpp
> +++ b/test/init.cpp
> @@ -1,4 +1,4 @@
> -#include <libcamera.h>
> +#include <libcamera/libcamera.h>
>
> int main(void)
> {
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list