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.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk
index 09455d61b2..ea4d22743f 100644
--- a/package/opencv3/opencv3.mk
+++ b/package/opencv3/opencv3.mk
@@ -11,13 +11,21 @@ OPENCV3_LICENSE = BSD-3-Clause
OPENCV3_LICENSE_FILES = LICENSE
OPENCV3_SUPPORTS_IN_SOURCE_BUILD = NO
+OPENCV3_CXXFLAGS = $(TARGET_CXXFLAGS)
+
# Uses __atomic_fetch_add_4
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-OPENCV3_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+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
endif
# OpenCV component options
OPENCV3_CONF_OPTS += \
+ -DCMAKE_CXX_FLAGS="$(OPENCV3_CXXFLAGS)" \
-DBUILD_DOCS=OFF \
-DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV3_BUILD_PERF_TESTS),ON,OFF) \
-DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV3_BUILD_TESTS),ON,OFF) \