Skip to content

Commit

Permalink
Allow raspi camera plugin to build under Ubuntu
Browse files Browse the repository at this point in the history
Ubuntu ships the libraspberrypi-dev packages that places the raspberry
header files under /usr/include instead under /opt. Extend the cmake
logic to pick up also header files there.

Also the --no-as-needed flag seems to be required since otherwise the
compiled binary will end up with mmal errors (compare also gstreamer,
which ran into a similar issue:
thaytan/gst-rpicamsrc@79860a0)

Signed-off-by: Arne Schwabe <[email protected]>
  • Loading branch information
schwabe committed Dec 30, 2021
1 parent 310b29f commit 119c2fd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

if (EXISTS /opt/vc/include)
# Ubuntu libraspberrypi-dev places the raspberry header files under /usr/include so we
# check for the vcos.h header
if (EXISTS /opt/vc/include OR EXISTS /usr/include/interface/vcos/vcos.h)
set(HAS_RASPI ON)
else()
set(HAS_RASPI OFF)
Expand Down

0 comments on commit 119c2fd

Please sign in to comment.