aboutsummaryrefslogtreecommitdiff
path: root/ports/opencv4
diff options
context:
space:
mode:
Diffstat (limited to 'ports/opencv4')
-rw-r--r--ports/opencv4/0011-devendor-quirc.patch26
-rw-r--r--ports/opencv4/CONTROL102
-rw-r--r--ports/opencv4/portfile.cmake7
-rw-r--r--ports/opencv4/vcpkg.json222
4 files changed, 254 insertions, 103 deletions
diff --git a/ports/opencv4/0011-devendor-quirc.patch b/ports/opencv4/0011-devendor-quirc.patch
new file mode 100644
index 000000000..a1f13849e
--- /dev/null
+++ b/ports/opencv4/0011-devendor-quirc.patch
@@ -0,0 +1,26 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 89521b1..5ff0f01 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -772,7 +772,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 3fa0c5d..f4c0ad6 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 objc 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/opencv4/CONTROL b/ports/opencv4/CONTROL
deleted file mode 100644
index 5de96cd0b..000000000
--- a/ports/opencv4/CONTROL
+++ /dev/null
@@ -1,102 +0,0 @@
-Source: opencv4
-Version: 4.5.0
-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: ade
-Build-Depends: ade
-Description: graph api
-
-Feature: contrib
-Build-Depends: hdf5 (!uwp&!(windows&(arm|arm64))), tesseract (!uwp&!(windows&(arm|arm64)))
-Description: opencv_contrib module
-
-Feature: cuda
-Build-Depends: opencv4[core,contrib], cuda, cudnn
-Description: CUDA support for opencv
-
-Feature: dnn
-Build-Depends: protobuf
-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, opencv4[core], opencv4[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: openmp
-Description: Enable openmp support for opencv
-
-Feature: ovis
-Build-Depends: opencv4[core,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: opencv4[core,contrib], opencv4[core,eigen], 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: opencv4[contrib], 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/opencv4/portfile.cmake b/ports/opencv4/portfile.cmake
index 21f6e2278..cc7d4d579 100644
--- a/ports/opencv4/portfile.cmake
+++ b/ports/opencv4/portfile.cmake
@@ -21,6 +21,7 @@ vcpkg_from_github(
0004-fix-policy-CMP0057.patch
0009-fix-uwp.patch
0010-fix-interface_link_libraries.patch # Remove this patch when the next update
+ 0011-devendor-quirc.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@@ -42,8 +43,8 @@ set(ADE_DIR ${CURRENT_INSTALLED_DIR}/share/ade CACHE PATH "Path to existing ADE
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"ade" WITH_ADE
"contrib" WITH_CONTRIB
- "cuda" WITH_CUDA
"cuda" WITH_CUBLAS
+ "cuda" WITH_CUDA
"eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG
"gdcm" WITH_GDCM
@@ -56,6 +57,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
@@ -442,6 +444,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 CONFIG)")
+ endif()
if("qt" IN_LIST FEATURES)
string(APPEND DEPS_STRING "
set(CMAKE_AUTOMOC ON)
diff --git a/ports/opencv4/vcpkg.json b/ports/opencv4/vcpkg.json
new file mode 100644
index 000000000..dc64f6c4d
--- /dev/null
+++ b/ports/opencv4/vcpkg.json
@@ -0,0 +1,222 @@
+{
+ "name": "opencv4",
+ "version": "4.5.0",
+ "port-version": 1,
+ "description": "computer vision library",
+ "homepage": "https://github.com/opencv/opencv",
+ "dependencies": [
+ "zlib"
+ ],
+ "default-features": [
+ "dnn",
+ "jpeg",
+ "png",
+ "quirc",
+ "tiff",
+ "webp"
+ ],
+ "features": {
+ "ade": {
+ "description": "graph api",
+ "dependencies": [
+ "ade"
+ ]
+ },
+ "contrib": {
+ "description": "opencv_contrib module",
+ "dependencies": [
+ {
+ "name": "hdf5",
+ "platform": "!uwp & !(windows & (arm | arm64))"
+ },
+ {
+ "name": "tesseract",
+ "platform": "!uwp & !(windows & (arm | arm64))"
+ }
+ ]
+ },
+ "cuda": {
+ "description": "CUDA support for opencv",
+ "dependencies": [
+ "cuda",
+ "cudnn",
+ {
+ "name": "opencv4",
+ "default-features": false,
+ "features": [
+ "contrib"
+ ]
+ }
+ ]
+ },
+ "dnn": {
+ "description": "Enable dnn module",
+ "dependencies": [
+ "protobuf"
+ ]
+ },
+ "eigen": {
+ "description": "Eigen support for opencv",
+ "dependencies": [
+ "eigen3"
+ ]
+ },
+ "ffmpeg": {
+ "description": "ffmpeg support for opencv",
+ "dependencies": [
+ "ffmpeg"
+ ]
+ },
+ "gdcm": {
+ "description": "GDCM support for opencv",
+ "dependencies": [
+ "gdcm"
+ ]
+ },
+ "halide": {
+ "description": "Halide support for opencv",
+ "dependencies": [
+ "halide",
+ {
+ "name": "opencv4",
+ "default-features": false
+ },
+ {
+ "name": "opencv4",
+ "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"
+ ]
+ },
+ "openmp": {
+ "description": "Enable openmp support for opencv"
+ },
+ "ovis": {
+ "description": "opencv_ovis module",
+ "dependencies": [
+ "ogre",
+ {
+ "name": "opencv4",
+ "default-features": false,
+ "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",
+ "gflags",
+ "glog",
+ {
+ "name": "opencv4",
+ "default-features": false,
+ "features": [
+ "contrib"
+ ]
+ },
+ {
+ "name": "opencv4",
+ "default-features": false,
+ "features": [
+ "eigen"
+ ]
+ }
+ ]
+ },
+ "tbb": {
+ "description": "Enable Intel Threading Building Blocks",
+ "dependencies": [
+ "tbb"
+ ]
+ },
+ "tiff": {
+ "description": "TIFF support for opencv",
+ "dependencies": [
+ "tiff"
+ ]
+ },
+ "vtk": {
+ "description": "vtk support for opencv",
+ "dependencies": [
+ {
+ "name": "opencv4",
+ "features": [
+ "contrib"
+ ]
+ },
+ "vtk"
+ ]
+ },
+ "webp": {
+ "description": "WebP support for opencv",
+ "dependencies": [
+ "libwebp"
+ ]
+ },
+ "world": {
+ "description": "Compile to a single package support for opencv"
+ }
+ }
+}