aboutsummaryrefslogtreecommitdiff
path: root/ports/opencv3
diff options
context:
space:
mode:
Diffstat (limited to 'ports/opencv3')
-rw-r--r--ports/opencv3/0010-devendor-quirc.patch26
-rw-r--r--ports/opencv3/CONTROL99
-rw-r--r--ports/opencv3/portfile.cmake7
-rw-r--r--ports/opencv3/vcpkg.json214
4 files changed, 246 insertions, 100 deletions
diff --git a/ports/opencv3/0010-devendor-quirc.patch b/ports/opencv3/0010-devendor-quirc.patch
new file mode 100644
index 000000000..1d2d7ccb7
--- /dev/null
+++ b/ports/opencv3/0010-devendor-quirc.patch
@@ -0,0 +1,26 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 15eb053..58a9585 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -766,7 +766,7 @@ if(WITH_OPENVX)
+ endif()
+
+ if(WITH_QUIRC)
+- add_subdirectory(3rdparty/quirc)
++ find_package(quirc CONFIG REQUIRED)
+ set(HAVE_QUIRC TRUE)
+ endif()
+ # ----------------------------------------------------------------------------
+diff --git a/modules/objdetect/CMakeLists.txt b/modules/objdetect/CMakeLists.txt
+index 414e578..4f26d75 100644
+--- a/modules/objdetect/CMakeLists.txt
++++ b/modules/objdetect/CMakeLists.txt
+@@ -2,7 +2,5 @@ set(the_description "Object Detection")
+ ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d WRAP java python js)
+
+ if(HAVE_QUIRC)
+- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR)
+- ocv_include_directories(${QUIRC_INCLUDE})
+- ocv_target_link_libraries(${the_module} quirc)
++ ocv_target_link_libraries(${the_module} quirc::quirc)
+ endif()
diff --git a/ports/opencv3/CONTROL b/ports/opencv3/CONTROL
deleted file mode 100644
index 586c4337e..000000000
--- a/ports/opencv3/CONTROL
+++ /dev/null
@@ -1,99 +0,0 @@
-Source: opencv3
-Version: 3.4.12
-Build-Depends: zlib
-Homepage: https://github.com/opencv/opencv
-Description: computer vision library
-Default-Features: dnn, jpeg, png, tiff, webp
-
-Feature: nonfree
-Description: allow nonfree and unredistributable libraries
-
-Feature: flann
-Build-Depends: protobuf
-Description: opencv_flann module
-
-Feature: contrib
-Build-Depends: opencv3[dnn], hdf5 (!uwp&!(windows&(arm|arm64))), tesseract (!uwp&!(windows&(arm|arm64)))
-Description: opencv_contrib module
-
-Feature: cuda
-Build-Depends: opencv3[contrib], cuda, cudnn
-Description: CUDA support for opencv
-
-Feature: dnn
-Build-Depends: opencv3[flann]
-Description: Enable dnn module
-
-Feature: eigen
-Build-Depends: eigen3
-Description: Eigen support for opencv
-
-Feature: ffmpeg
-Build-Depends: ffmpeg
-Description: ffmpeg support for opencv
-
-Feature: gdcm
-Build-Depends: gdcm
-Description: GDCM support for opencv
-
-Feature: halide
-Build-Depends: halide, opencv3[core], opencv3[dnn]
-Description: Halide support for opencv
-
-Feature: ipp
-Description: Enable Intel Integrated Performance Primitives
-
-Feature: jasper
-Build-Depends: jasper
-Description: JPEG 2000 support for opencv
-
-Feature: jpeg
-Build-Depends: libjpeg-turbo
-Description: JPEG support for opencv
-
-Feature: lapack
-Build-Depends: blas, lapack
-Description: LAPACK support for opencv
-
-Feature: openexr
-Build-Depends: openexr
-Description: OpenEXR support for opencv
-
-Feature: opengl
-Build-Depends: opengl
-Description: opengl support for opencv
-
-Feature: ovis
-Build-Depends: opencv3[contrib], ogre
-Description: opencv_ovis module
-
-Feature: png
-Build-Depends: libpng
-Description: PNG support for opencv
-
-Feature: qt
-Build-Depends: qt5-base[core]
-Description: Qt GUI support for opencv
-
-Feature: sfm
-Build-Depends: opencv3[contrib], eigen3, glog, gflags, ceres
-Description: opencv_sfm module
-
-Feature: tbb
-Build-Depends: tbb
-Description: Enable Intel Threading Building Blocks
-
-Feature: tiff
-Build-Depends: tiff
-Description: TIFF support for opencv
-
-Feature: vtk
-Build-Depends: vtk
-Description: vtk support for opencv
-
-Feature: webp
-Build-Depends: libwebp
-Description: WebP support for opencv
-
-Feature: world
-Description: Compile to a single package support for opencv
diff --git a/ports/opencv3/portfile.cmake b/ports/opencv3/portfile.cmake
index c65792bf0..4345a1c2f 100644
--- a/ports/opencv3/portfile.cmake
+++ b/ports/opencv3/portfile.cmake
@@ -20,6 +20,7 @@ vcpkg_from_github(
0003-force-package-requirements.patch
0005-fix-vtk9.patch
0009-fix-uwp.patch
+ 0010-devendor-quirc.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@@ -38,8 +39,8 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"contrib" WITH_CONTRIB
- "cuda" WITH_CUDA
"cuda" WITH_CUBLAS
+ "cuda" WITH_CUDA
"dnn" BUILD_opencv_dnn
"eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG
@@ -54,6 +55,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"opengl" WITH_OPENGL
"png" WITH_PNG
"qt" WITH_QT
+ "quirc" WITH_QUIRC
"sfm" BUILD_opencv_sfm
"tiff" WITH_TIFF
"vtk" WITH_VTK
@@ -401,6 +403,9 @@ find_dependency(Tesseract)")
if(BUILD_opencv_ovis)
string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)")
endif()
+ if("quirc" IN_LIST FEATURES)
+ string(APPEND DEPS_STRING "\nfind_dependency(quirc)")
+ endif()
if("qt" IN_LIST FEATURES)
string(APPEND DEPS_STRING "
set(CMAKE_AUTOMOC ON)
diff --git a/ports/opencv3/vcpkg.json b/ports/opencv3/vcpkg.json
new file mode 100644
index 000000000..c977a0132
--- /dev/null
+++ b/ports/opencv3/vcpkg.json
@@ -0,0 +1,214 @@
+{
+ "name": "opencv3",
+ "version": "3.4.12",
+ "port-version": 1,
+ "description": "computer vision library",
+ "homepage": "https://github.com/opencv/opencv",
+ "dependencies": [
+ "zlib"
+ ],
+ "default-features": [
+ "dnn",
+ "jpeg",
+ "png",
+ "tiff",
+ "webp"
+ ],
+ "features": {
+ "contrib": {
+ "description": "opencv_contrib module",
+ "dependencies": [
+ {
+ "name": "hdf5",
+ "platform": "!uwp & !(windows & (arm | arm64))"
+ },
+ {
+ "name": "opencv3",
+ "features": [
+ "dnn"
+ ]
+ },
+ {
+ "name": "tesseract",
+ "platform": "!uwp & !(windows & (arm | arm64))"
+ }
+ ]
+ },
+ "cuda": {
+ "description": "CUDA support for opencv",
+ "dependencies": [
+ "cuda",
+ "cudnn",
+ {
+ "name": "opencv3",
+ "features": [
+ "contrib"
+ ]
+ }
+ ]
+ },
+ "dnn": {
+ "description": "Enable dnn module",
+ "dependencies": [
+ {
+ "name": "opencv3",
+ "features": [
+ "flann"
+ ]
+ }
+ ]
+ },
+ "eigen": {
+ "description": "Eigen support for opencv",
+ "dependencies": [
+ "eigen3"
+ ]
+ },
+ "ffmpeg": {
+ "description": "ffmpeg support for opencv",
+ "dependencies": [
+ "ffmpeg"
+ ]
+ },
+ "flann": {
+ "description": "opencv_flann module",
+ "dependencies": [
+ "protobuf"
+ ]
+ },
+ "gdcm": {
+ "description": "GDCM support for opencv",
+ "dependencies": [
+ "gdcm"
+ ]
+ },
+ "halide": {
+ "description": "Halide support for opencv",
+ "dependencies": [
+ "halide",
+ {
+ "name": "opencv3",
+ "default-features": false
+ },
+ {
+ "name": "opencv3",
+ "features": [
+ "dnn"
+ ]
+ }
+ ]
+ },
+ "ipp": {
+ "description": "Enable Intel Integrated Performance Primitives"
+ },
+ "jasper": {
+ "description": "JPEG 2000 support for opencv",
+ "dependencies": [
+ "jasper"
+ ]
+ },
+ "jpeg": {
+ "description": "JPEG support for opencv",
+ "dependencies": [
+ "libjpeg-turbo"
+ ]
+ },
+ "lapack": {
+ "description": "LAPACK support for opencv",
+ "dependencies": [
+ "blas",
+ "lapack"
+ ]
+ },
+ "nonfree": {
+ "description": "allow nonfree and unredistributable libraries"
+ },
+ "openexr": {
+ "description": "OpenEXR support for opencv",
+ "dependencies": [
+ "openexr"
+ ]
+ },
+ "opengl": {
+ "description": "opengl support for opencv",
+ "dependencies": [
+ "opengl"
+ ]
+ },
+ "ovis": {
+ "description": "opencv_ovis module",
+ "dependencies": [
+ "ogre",
+ {
+ "name": "opencv3",
+ "features": [
+ "contrib"
+ ]
+ }
+ ]
+ },
+ "png": {
+ "description": "PNG support for opencv",
+ "dependencies": [
+ "libpng"
+ ]
+ },
+ "qt": {
+ "description": "Qt GUI support for opencv",
+ "dependencies": [
+ {
+ "name": "qt5-base",
+ "default-features": false
+ }
+ ]
+ },
+ "quirc": {
+ "description": "Enable QR code module",
+ "dependencies": [
+ "quirc"
+ ]
+ },
+ "sfm": {
+ "description": "opencv_sfm module",
+ "dependencies": [
+ "ceres",
+ "eigen3",
+ "gflags",
+ "glog",
+ {
+ "name": "opencv3",
+ "features": [
+ "contrib"
+ ]
+ }
+ ]
+ },
+ "tbb": {
+ "description": "Enable Intel Threading Building Blocks",
+ "dependencies": [
+ "tbb"
+ ]
+ },
+ "tiff": {
+ "description": "TIFF support for opencv",
+ "dependencies": [
+ "tiff"
+ ]
+ },
+ "vtk": {
+ "description": "vtk support for opencv",
+ "dependencies": [
+ "vtk"
+ ]
+ },
+ "webp": {
+ "description": "WebP support for opencv",
+ "dependencies": [
+ "libwebp"
+ ]
+ },
+ "world": {
+ "description": "Compile to a single package support for opencv"
+ }
+ }
+}