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.

74 lines
2.2 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:=3.1.0
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
  13. PKG_SOURCE_URL:=http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$(PKG_VERSION)/
  14. PKG_HASH:=1f6990249fdb82804fff40e96fa6d99949023ab0e3277eae4bd459b374e622a4
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=LICENSE
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/opencv/Default/description
  20. OpenCV (Open Source Computer Vision Library) is an open source computer
  21. vision and machine learning software library. OpenCV was built to provide
  22. a common infrastructure for computer vision applications and to accelerate
  23. the use of machine perception in the commercial products. Being a
  24. BSD-licensed product, OpenCV makes it easy for businesses to utilize
  25. and modify the code.
  26. endef
  27. define Package/opencv
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. TITLE:=OpenCV
  31. URL:=http://opencv.org/
  32. MAINTAINER:=WRTnode Team <pub@wrtnode.com>
  33. DEPENDS:=+libpthread +librt +libstdcpp +zlib +libjpeg
  34. endef
  35. PKG_INSTALL:=1
  36. CMAKE_OPTIONS += -DBUILD_opencv_gpu:BOOL=OFF \
  37. -DWITH_1394:BOOL=OFF -DBUILD_opencv_stitching:BOOL=OFF \
  38. -DBUILD_opencv_superres:BOOL=OFF -DBUILD_opencv_ts:BOOL=OFF \
  39. -DBUILD_opencv_highgui:BOOL=OFF \
  40. -DBUILD_opencv_videostab:BOOL=OFF \
  41. -DWITH_FFMPEG:BOOL=OFF \
  42. -DWITH_GSTREAMER:BOOL=OFF \
  43. -DWITH_LIBV4L:BOOL=OFF \
  44. -DWITH_PNG:BOOL=OFF \
  45. -DWITH_GTK:BOOL=OFF \
  46. -DWITH_TIFF:BOOL=OFF \
  47. -DCMAKE_VERBOSE:BOOL=OFF \
  48. -DENABLE_PRECOMPILED_HEADERS=OFF
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/include
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv $(1)/usr/include/
  52. $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv2 $(1)/usr/include/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/
  55. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opencv.pc $(1)/usr/lib/pkgconfig/
  57. endef
  58. define Package/opencv/install
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/
  61. endef
  62. $(eval $(call BuildPackage,opencv))