Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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:=1
  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_TIFF:BOOL=OFF \
  46. -DCMAKE_VERBOSE:BOOL=OFF \
  47. -DENABLE_PRECOMPILED_HEADERS=OFF
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/include
  50. $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv $(1)/usr/include/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/include/opencv2 $(1)/usr/include/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/
  54. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/opencv.pc $(1)/usr/lib/pkgconfig/
  56. endef
  57. define Package/opencv/install
  58. $(INSTALL_DIR) $(1)/usr/lib
  59. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libopencv* $(1)/usr/lib/
  60. endef
  61. $(eval $(call BuildPackage,opencv))