You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2013-2014 wrtnode.com
  3. # Copyright (C) 2015-2016 OpenWrt.org
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=opencv
  10. PKG_VERSION:=4.1.2
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_URL:=https://github.com/opencv/opencv
  14. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  15. PKG_MIRROR_HASH:=1bd1cad4fa5c8f21499a45869fea40b7886026c048129a01be87b092178258c1
  16. PKG_MAINTAINER:=
  17. PKG_LICENSE:=BSD-3-Clause
  18. PKG_LICENSE_FILES:=LICENSE
  19. CMAKE_INSTALL:=1
  20. CMAKE_BINARY_SUBDIR:=build
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_USE_MIPS16:=0
  23. include $(INCLUDE_DIR)/package.mk
  24. include $(INCLUDE_DIR)/cmake.mk
  25. define Package/opencv/Default/description
  26. OpenCV (Open Source Computer Vision Library) is an open source computer
  27. vision and machine learning software library. OpenCV was built to provide
  28. a common infrastructure for computer vision applications and to accelerate
  29. the use of machine perception in the commercial products. Being a
  30. BSD-licensed product, OpenCV makes it easy for businesses to utilize
  31. and modify the code.
  32. endef
  33. define Package/opencv
  34. SECTION:=libs
  35. CATEGORY:=Libraries
  36. TITLE:=OpenCV
  37. URL:=https://opencv.org/
  38. DEPENDS:=+libpthread +librt +libatomic +libstdcpp +zlib +libjpeg +libwebp
  39. endef
  40. CMAKE_OPTIONS += \
  41. -DBUILD_opencv_gpu:BOOL=OFF \
  42. -DWITH_1394:BOOL=OFF -DBUILD_opencv_stitching:BOOL=OFF \
  43. -DBUILD_opencv_superres:BOOL=OFF -DBUILD_opencv_ts:BOOL=OFF \
  44. -DBUILD_opencv_highgui:BOOL=OFF \
  45. -DBUILD_opencv_videostab:BOOL=OFF \
  46. -DWITH_FFMPEG:BOOL=OFF \
  47. -DWITH_GSTREAMER:BOOL=OFF \
  48. -DWITH_LIBV4L:BOOL=OFF \
  49. -DWITH_PNG:BOOL=OFF \
  50. -DWITH_GTK:BOOL=OFF \
  51. -DWITH_TIFF:BOOL=OFF \
  52. -DCMAKE_VERBOSE:BOOL=OFF \
  53. -DENABLE_PRECOMPILED_HEADERS=OFF
  54. TARGET_LDFLAGS += -latomic
  55. define Package/opencv/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/
  58. endef
  59. $(eval $(call BuildPackage,opencv))