package/mjpg-streamer: add optional dependency to opencv3
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 30 Sep 2018 19:03:21 +0000 (21:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 8 Oct 2018 19:28:03 +0000 (21:28 +0200)
According to
https://github.com/jacksonliam/mjpg-streamer/blob/master/mjpg-streamer-experimental/plugins/input_opencv/README.md
the plugin does not support OpenCV 2.x.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mjpg-streamer/mjpg-streamer.mk

index 2941e314b316b33b7e097b88b4b1d9f0c9866cfc..50ed980b7a4ecd997d410223dc6fd2b925ed83d3 100644 (file)
@@ -15,4 +15,11 @@ ifeq ($(BR2_PACKAGE_LIBV4L),y)
 MJPG_STREAMER_DEPENDENCIES += libv4l
 endif
 
+ifeq ($(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)$(BR2_PACKAGE_OPENCV3_LIB_IMGPROC)$(BR2_PACKAGE_OPENCV3_LIB_IMGPROC),yyy)
+MJPG_STREAMER_CONF_OPTS += -DPLUGIN_INPUT_OPENCV=ON
+MJPG_STREAMER_DEPENDENCIES += host-pkgconf opencv3
+else
+MJPG_STREAMER_CONF_OPTS += -DPLUGIN_INPUT_OPENCV=OFF
+endif
+
 $(eval $(cmake-package))