Age | Commit message (Collapse) | Author |
|
Building libcamera as a subproject is failing when tracepoints are
enabled due to incorrectly managing the relative paths between the
source and build directory while generating tracepoint headers.
The previously used
path = output.replace('include/', '', 1)
logic is not sufficient to correctly determine the proper path when
libcamera is built as a subproject, and does not correctly handle the
relative paths, causing path to be processed as:
'subprojects/libcamera/include/libcamera/internal/tracepoints.h'.replace('include/', '', 1)
which evaluates to
'subprojects/libcamera/libcamera/internal/tracepoints.h'
so the tracepoints.h header file will try to include:
#define TRACEPOINT_INCLUDE "subprojects/libcamera/libcamera/internal/tracepoints.h"
which will fail.
Fix it by using Python's pathlib to calculate the relative path of the
output file with respect to the "include" directory of libcamera.
This has been tested with Pipewire. For non-subproject builds it should
generate the exact same path that was previously generated.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
[Kieran: Commit message expanded/reworded]
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
All libcamera headers are meant to be installed in
${prefix}/include/libcamera/libcamera, with pkgconfig specifying the
include directory as `-I ${prefix}/include/libcamera`. Applications then
include the headers with `#include <libcamera/camera.h>`.
The base and ipa headers are meant to be installed in subdirectories of
the libcamera headers directory, but are mistakenly installed one level
too high, in ${prefix}/include/libcamera. This leads to compilation
failures when including the base or ipa header.
Fix this by setting the meson libcamera_include_dir variable to the
libcamera headers directory. All other header paths are derived from
that variable and are now correct.
Reported-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm>
Bug: https://bugs.libcamera.org/show_bug.cgi?id=79
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The IPA headers are installed into $prefix/include/libcamera/ipa/, but
are located in the source tree in include/ipa/. This requires files
within libcamera to include them with
#include <ipa/foo.h>
while a third party IPA would need to use
#include <libcamera/ipa/foo.h>
Not only is this inconsistent, it can create issues later if IPA headers
need to include each other, as the first form of include directive
wouldn't be valid once the headers are installed.
Fix the problem by moving the IPA headers to include/libcamera/ipa/.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
In an attempt to clarify the license terms of all files in the libcamera
project, the build system files deserve particular attention. While they
describe how the binaries are created, they are not themselves
transformed into any part of binary distributions of the software, and
thus don't influence the copyright on the binary packages. They are
however subject to copyright, and thus influence the distribution terms
of the source packages.
Most of the meson.build files would not meet the threshold of
originality criteria required for copyright protection. Some of the more
complex meson.build files may be eligible for copyright protection. To
avoid any ambiguity and uncertainty, state our intent to not assert
copyrights on the build system files by putting them in the public
domain with the CC0-1.0 license.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Show Liu <show.liu@linaro.org>
|
|
The ipa includes are located in include/libcamera/ipa/. This gives an
incorrect impression that they are a sub-part of the rest of the
libcamera API, while they are the API towards the IPA the same way that
include/libcamera/ contains the API towards applications. To clarify
this, move them to include/ipa/.
The IPA headers are however still part of libcamera, so installing them
to ${prefix}/include/ipa/ would make little sense. To fix this, move the
application facing API to ${prefix}/include/libcamera/libcamera/ when
installed, and the IPA to ${prefix}/include/libcamera/ipa/. When major
versions of libcamera will be released, they could then be installed
side by side in ${prefix}/include/libcamera-${version}/.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Copy the Android Camera3 HAL headers from the ChromiumOS build system
and define a new inclusion directive in the meson build system for them.
The header files have been copied from:
https://chromium.googlesource.com/chromiumos/platform2
at revision 9e65ddd2c496e712f005ada9715decd2ff8e4a03
and provide:
1) Android CameraHAL3 HAL headers in include/android/hardware/
2) The Android system headers in include/android/system/
3) The Android camera metadata headers in include/android/metadata/
The original path in the Cros platform2/ repository is, respectively:
camera/android/header_files/include/hardware
camera/android/header_files/include/system
camera/android/libcamera_metadata/include/
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
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.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|