[libcamera-devel] system locations of libcamera headers

Umang Jain umang.jain at ideasonboard.com
Fri May 7 07:24:19 CEST 2021


Hi all,

If I compile the master branch with --prefix=/usr
/meson --prefix=/usr -Dpipelines=uvcvideo,ipu3 build && sudo ninja -C 
build install/


The headers turns out to have a directory structure as below:


[uajain at localhost libcamera]$ tree /usr/include/libcamera/
/usr/include/libcamera/
├── ipa
│   ├── ipa_controls.h
│   ├── ipa_interface.h
│   └── ipa_module_info.h
└── libcamera
     ├── bound_method.h
     ├── buffer.h
     ├── camera.h
     ├── camera_manager.h
     ├── class.h
     ├── compiler.h
     ├── control_ids.h
     ├── controls.h
     ├── file_descriptor.h
     ├── formats.h
     ├── framebuffer_allocator.h
     ├── geometry.h
     ├── libcamera.h
     ├── logging.h
     ├── object.h
     ├── pixel_format.h
     ├── property_ids.h
     ├── request.h
     ├── signal.h
     ├── span.h
     ├── stream.h
     ├── transform.h
     └── version.h

2 directories, 26 files


My question is, is this how we want public headers to be placed ? For 
e.g. the absolute path of signal.h 
is/usr/include/libcamera/libcamera/signal.h, hence, even the below diff 
will compile successfully (due to linker find path magic)

diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp
index cd83c684..5f005d1b 100644
--- a/src/libcamera/object.cpp
+++ b/src/libcamera/object.cpp
@@ -9,7 +9,7 @@

  #include <algorithm>

-#include <libcamera/signal.h>
+#include <libcamera/libcamera/signal.h>


Considering the case where we also need to expose some of the internal 
libcamera headers on system locations (for IPAs to use) - It's better to 
kick off some dicussions around how we would structure the header 
locations. This will also clear some of my ongoing meson cleanup work 
(not all patches, but only a couple).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210507/5d84e410/attachment.htm>


More information about the libcamera-devel mailing list