kumquat-buildroot/package/libcamera-apps/libcamera-apps.mk
Marcus Folkesson cf4c94de51 package/libcamera-apps: enable LIBAV only if libdrm and ffmpeg is present
Since commit 35266e84043f880d7591e52b71a8c5b8d0e4717d, libcamera-apps
does enable LIBAV by default which depends on libdrm and ffpmeg.

Fixes:
- http://autobuild.buildroot.net/results/548f2a3b353ce4693fb60d7fb1e06e02af22991c/

/home/buildroot/autobuild/run/instance-1/output-1/build/libcamera-apps-1.1.1/encoder/libav_encoder.cpp:13:10: fatal error: libdrm/drm_fourcc.h: No such file or directory
   13 | #include <libdrm/drm_fourcc.h>
      |          ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-02-22 15:52:01 +01:00

60 lines
1.5 KiB
Makefile

################################################################################
#
# libcamera-apps
#
################################################################################
LIBCAMERA_APPS_VERSION = 1.1.1
LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,v$(LIBCAMERA_APPS_VERSION))
LIBCAMERA_APPS_LICENSE = BSD-2-Clause
LIBCAMERA_APPS_LICENSE_FILES = license.txt
LIBCAMERA_APPS_DEPENDENCIES = \
host-pkgconf \
boost \
jpeg \
libcamera \
libexif \
libpng \
tiff
LIBCAMERA_APPS_CONF_OPTS = \
-DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled \
-DENABLE_OPENCV=0 \
-DENABLE_TFLITE=0
ifeq ($(BR2_PACKAGE_LIBDRM),y)
LIBCAMERA_APPS_DEPENDENCIES += libdrm
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=1
else
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=0
endif
ifeq ($(BR2_PACKAGE_FFMPEG)$(BR2_PACKAGE_LIBDRM),yy)
LIBCAMERA_APPS_DEPENDENCIES += ffmpeg libdrm
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_LIBAV=1
else
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_LIBAV=0
endif
ifeq ($(BR2_PACKAGE_XORG7),y)
LIBCAMERA_APPS_DEPENDENCIES += \
$(if $(BR2_PACKAGE_LIBEPOXY),libepoxy) \
$(if $(BR2_PACKAGE_XLIB_LIBX11),xlib_libX11)
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=1
else
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=0
endif
ifeq ($(BR2_PACKAGE_QT5),y)
LIBCAMERA_APPS_DEPENDENCIES += qt5base
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=1
else
LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=0
endif
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
LIBCAMERA_APPS_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
$(eval $(cmake-package))