aboutsummaryrefslogtreecommitdiff
path: root/package/opencv3/opencv3.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/opencv3/opencv3.mk')
-rw-r--r--package/opencv3/opencv3.mk33
1 files changed, 26 insertions, 7 deletions
diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk
index 1ab5cf1efd..b1b86ba71d 100644
--- a/package/opencv3/opencv3.mk
+++ b/package/opencv3/opencv3.mk
@@ -4,7 +4,7 @@
#
################################################################################
-OPENCV3_VERSION = 3.4.9
+OPENCV3_VERSION = 3.4.13
OPENCV3_SITE = $(call github,opencv,opencv,$(OPENCV3_VERSION))
OPENCV3_INSTALL_STAGING = YES
OPENCV3_LICENSE = BSD-3-Clause
@@ -13,6 +13,11 @@ OPENCV3_SUPPORTS_IN_SOURCE_BUILD = NO
OPENCV3_CXXFLAGS = $(TARGET_CXXFLAGS)
+# Uses __atomic_fetch_add_4
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+OPENCV3_CXXFLAGS += -latomic
+endif
+
# Fix c++11 build with missing std::exception_ptr
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_64735),y)
OPENCV3_CXXFLAGS += -DCV__EXCEPTION_PTR=0
@@ -41,6 +46,7 @@ endif
# OpenCV build options
OPENCV3_CONF_OPTS += \
-DBUILD_WITH_STATIC_CRT=OFF \
+ -DENABLE_CCACHE=OFF \
-DENABLE_COVERAGE=OFF \
-DENABLE_FAST_MATH=ON \
-DENABLE_IMPL_COLLECTION=OFF \
@@ -48,7 +54,7 @@ OPENCV3_CONF_OPTS += \
-DENABLE_OMIT_FRAME_POINTER=ON \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DENABLE_PROFILING=OFF \
- -DOPENCV3_WARNINGS_ARE_ERRORS=OFF
+ -DOPENCV_WARNINGS_ARE_ERRORS=OFF
# OpenCV link options
OPENCV3_CONF_OPTS += \
@@ -218,7 +224,6 @@ OPENCV3_CONF_OPTS += \
-DWITH_VA=OFF \
-DWITH_VA_INTEL=OFF \
-DWITH_VTK=OFF \
- -DWITH_WEBP=OFF \
-DWITH_XINE=OFF
OPENCV3_DEPENDENCIES += host-pkgconf zlib
@@ -282,7 +287,9 @@ OPENCV3_CONF_OPTS += -DWITH_PNG=OFF
endif
ifeq ($(BR2_PACKAGE_OPENCV3_WITH_PROTOBUF),y)
+# protobuf needs c++11 (since 3.6.0)
OPENCV3_CONF_OPTS += \
+ -DENABLE_CXX11=ON \
-DPROTOBUF_UPDATE_FILES=ON \
-DWITH_PROTOBUF=ON
OPENCV3_DEPENDENCIES += protobuf
@@ -313,6 +320,13 @@ else
OPENCV3_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV3_WITH_WEBP),y)
+OPENCV3_CONF_OPTS += -DWITH_WEBP=ON
+OPENCV3_DEPENDENCIES += webp
+else
+OPENCV3_CONF_OPTS += -DWITH_WEBP=OFF
+endif
+
ifeq ($(BR2_PACKAGE_OPENCV3_LIB_PYTHON),y)
OPENCV3_CONF_OPTS += \
-DBUILD_opencv_python2=OFF \
@@ -334,16 +348,21 @@ OPENCV3_CONF_OPTS += \
endif
# Installation hooks:
-define OPENCV3_CLEAN_INSTALL_DOC
- $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
+define OPENCV3_CLEAN_INSTALL_LICENSE
+ $(RM) -fr $(TARGET_DIR)/usr/share/licenses/opencv3
endef
-OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_DOC
+OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_LICENSE
define OPENCV3_CLEAN_INSTALL_CMAKE
- $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCVConfig*.cmake
+ $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCV*.cmake
endef
OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_CMAKE
+define OPENCV3_CLEAN_INSTALL_VALGRIND
+ $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/valgrind*
+endef
+OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_VALGRIND
+
ifneq ($(BR2_PACKAGE_OPENCV3_INSTALL_DATA),y)
define OPENCV3_CLEAN_INSTALL_DATA
$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/haarcascades \