menuconfig BR2_PACKAGE_OPENCV3
bool "opencv3"
select BR2_PACKAGE_ZLIB
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_USE_WCHAR
endif # BR2_PACKAGE_OPENCV3
comment "opencv3 needs a toolchain w/ C++, NPTL, wchar, dynamic library"
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on !BR2_INSTALL_LIBSTDCPP || \
!BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
OPENCV3_LICENSE = BSD-3c
OPENCV3_LICENSE_FILES = LICENSE
+# Uses __atomic_fetch_add_4
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+OPENCV3_CONF_OPTS += -DCMAKE_CXX_FLAGS="-latomic"
+endif
+
# OpenCV component options
OPENCV3_CONF_OPTS += \
-DBUILD_DOCS=OFF \