aboutsummaryrefslogtreecommitdiff
path: root/ports/opencv3
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2021-01-29 04:23:57 +0100
committerGitHub <noreply@github.com>2021-01-28 19:23:57 -0800
commiteb044d1eb5250a79c94c86f6157e034627f7628b (patch)
tree591c88640d8ee5ef61f1d3e417db9b639651e7b0 /ports/opencv3
parent2eece71f53de6f9a83d2b686b8adceb40100a134 (diff)
downloadvcpkg-eb044d1eb5250a79c94c86f6157e034627f7628b.tar.gz
vcpkg-eb044d1eb5250a79c94c86f6157e034627f7628b.zip
[OpenCV] bump to 4.5.1 and to 3.4.13 (#15859)
* [OpenCV] bump to 4.5.1 and to 3.4.13 * [OpenCV] fix patches * [OpenCV] fix hdf5 integration * [OpenCV] devendor quirc * fix quirc for downstream ports * [quirc] fix target export * update version refs * [OpenMVG] fix regressions with new opencv * update version refs * fix quirc mismatch * update version refs
Diffstat (limited to 'ports/opencv3')
-rw-r--r--ports/opencv3/0002-install-options.patch8
-rw-r--r--ports/opencv3/0003-force-package-requirements.patch72
-rw-r--r--ports/opencv3/0004-add-missing-stdexcept-include.patch12
-rw-r--r--ports/opencv3/0004-fix-eigen.patch13
-rw-r--r--ports/opencv3/0006-fix-uwp.patch (renamed from ports/opencv3/0009-fix-uwp.patch)4
-rw-r--r--ports/opencv3/0007-fix-hdf5.patch30
-rw-r--r--ports/opencv3/0008-devendor-quirc.patch (renamed from ports/opencv3/0010-devendor-quirc.patch)52
-rw-r--r--ports/opencv3/portfile.cmake13
-rw-r--r--ports/opencv3/vcpkg.json4
9 files changed, 102 insertions, 106 deletions
diff --git a/ports/opencv3/0002-install-options.patch b/ports/opencv3/0002-install-options.patch
index 1657579fa..431e02bf6 100644
--- a/ports/opencv3/0002-install-options.patch
+++ b/ports/opencv3/0002-install-options.patch
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d143a7a..15eb053 100644
+index fcb4a1d..5810b0c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -602,7 +602,7 @@ endif()
+@@ -607,7 +607,7 @@ endif()
ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS)
# --- Python Support ---
@@ -12,10 +12,10 @@ index d143a7a..15eb053 100644
endif()
diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake
-index 9ac671d..b14ce09 100644
+index 8a3dcdb..b8b3bae 100644
--- a/cmake/OpenCVCompilerOptions.cmake
+++ b/cmake/OpenCVCompilerOptions.cmake
-@@ -263,7 +263,6 @@ if(MSVC)
+@@ -262,7 +262,6 @@ if(MSVC)
#endif()
if(BUILD_WITH_DEBUG_INFO)
diff --git a/ports/opencv3/0003-force-package-requirements.patch b/ports/opencv3/0003-force-package-requirements.patch
index 7f1b0c906..e45ced441 100644
--- a/ports/opencv3/0003-force-package-requirements.patch
+++ b/ports/opencv3/0003-force-package-requirements.patch
@@ -1,44 +1,44 @@
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
-index fcf716b..f3951e3 100644
+index f99bb33..5407f70 100644
--- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
-@@ -6,7 +6,7 @@
- if(BUILD_ZLIB)
+@@ -7,7 +7,7 @@ if(BUILD_ZLIB)
ocv_clear_vars(ZLIB_FOUND)
else()
+ ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
- find_package(ZLIB "${MIN_VER_ZLIB}")
+ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED)
if(ZLIB_FOUND AND ANDROID)
if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$")
set(ZLIB_LIBRARIES z)
-@@ -30,7 +30,7 @@ if(WITH_JPEG)
- if(BUILD_JPEG)
+@@ -33,7 +33,7 @@ if(WITH_JPEG)
ocv_clear_vars(JPEG_FOUND)
else()
+ ocv_clear_internal_cache_vars(JPEG_LIBRARY JPEG_INCLUDE_DIR)
- include(FindJPEG)
+ find_package(JPEG REQUIRED)
endif()
if(NOT JPEG_FOUND)
-@@ -74,7 +74,7 @@ if(WITH_TIFF)
- if(BUILD_TIFF)
+@@ -79,7 +79,7 @@ if(WITH_TIFF)
ocv_clear_vars(TIFF_FOUND)
else()
+ ocv_clear_internal_cache_vars(TIFF_LIBRARY TIFF_INCLUDE_DIR)
- include(FindTIFF)
+ find_package(TIFF REQUIRED)
if(TIFF_FOUND)
ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION)
endif()
-@@ -117,7 +117,7 @@ if(WITH_WEBP)
- if(BUILD_WEBP)
+@@ -123,7 +123,7 @@ if(WITH_WEBP)
ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR)
else()
+ ocv_clear_internal_cache_vars(WEBP_LIBRARY WEBP_INCLUDE_DIR)
- include(cmake/OpenCVFindWebP.cmake)
+ find_package(WebP REQUIRED)
if(WEBP_FOUND)
set(HAVE_WEBP 1)
endif()
-@@ -158,7 +158,7 @@ if(WITH_JASPER)
+@@ -164,7 +164,7 @@ if(WITH_JASPER)
if(BUILD_JASPER)
ocv_clear_vars(JASPER_FOUND)
else()
@@ -47,75 +47,39 @@ index fcf716b..f3951e3 100644
endif()
if(NOT JASPER_FOUND)
-@@ -182,7 +182,7 @@ if(WITH_PNG)
- if(BUILD_PNG)
+@@ -189,7 +189,7 @@ if(WITH_PNG)
ocv_clear_vars(PNG_FOUND)
else()
+ ocv_clear_internal_cache_vars(PNG_LIBRARY PNG_INCLUDE_DIR)
- include(FindPNG)
+ find_package(PNG REQUIRED)
if(PNG_FOUND)
include(CheckIncludeFile)
check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H)
-@@ -213,7 +213,7 @@ endif()
- if(WITH_OPENEXR)
+@@ -221,7 +221,7 @@ if(WITH_OPENEXR)
ocv_clear_vars(HAVE_OPENEXR)
if(NOT BUILD_OPENEXR)
+ ocv_clear_internal_cache_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION)
- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake")
+ find_package(OpenEXR REQUIRED)
endif()
if(OPENEXR_FOUND)
-@@ -231,7 +231,7 @@ endif()
+@@ -239,7 +239,7 @@ endif()
# --- GDAL (optional) ---
if(WITH_GDAL)
- find_package(GDAL QUIET)
-+ find_package(GDAL REQUIRED)
++ find_package(GDAL REQUIRED)
if(NOT GDAL_FOUND)
set(HAVE_GDAL NO)
-@@ -243,7 +243,7 @@ if(WITH_GDAL)
+@@ -251,7 +251,7 @@ if(WITH_GDAL)
endif()
- if (WITH_GDCM)
+ if(WITH_GDCM)
- find_package(GDCM QUIET)
+ find_package(GDCM REQUIRED)
if(NOT GDCM_FOUND)
set(HAVE_GDCM NO)
ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES)
-diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
-index b9b1a95..596c152 100644
---- a/cmake/OpenCVFindLibsPerf.cmake
-+++ b/cmake/OpenCVFindLibsPerf.cmake
-@@ -51,14 +51,9 @@ endif(WITH_CUDA)
-
- # --- Eigen ---
- if(WITH_EIGEN AND NOT HAVE_EIGEN)
-- find_package(Eigen3 QUIET)
-+ find_package(Eigen3 REQUIRED)
-
- if(Eigen3_FOUND)
-- if(TARGET Eigen3::Eigen)
-- # Use Eigen3 imported target if possible
-- list(APPEND OPENCV_LINKER_LIBS Eigen3::Eigen)
-- set(HAVE_EIGEN 1)
-- else()
- if(DEFINED EIGEN3_INCLUDE_DIRS)
- set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIRS})
- set(HAVE_EIGEN 1)
-@@ -66,7 +61,6 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
- set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIR})
- set(HAVE_EIGEN 1)
- endif()
-- endif()
- if(HAVE_EIGEN)
- if(DEFINED EIGEN3_WORLD_VERSION) # CMake module
- set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION})
-@@ -77,6 +71,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
- set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR})
- set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH})
- endif()
-+ ocv_include_directories(${EIGEN_INCLUDE_PATH})
- endif()
- endif()
-
diff --git a/ports/opencv3/0004-add-missing-stdexcept-include.patch b/ports/opencv3/0004-add-missing-stdexcept-include.patch
deleted file mode 100644
index 2a7d90ce0..000000000
--- a/ports/opencv3/0004-add-missing-stdexcept-include.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/modules/cvv/src/util/observer_ptr.hpp b/modules/cvv/src/util/observer_ptr.hpp
-index fef3fea..68d1a80 100644
---- a/modules/cvv/src/util/observer_ptr.hpp
-+++ b/modules/cvv/src/util/observer_ptr.hpp
-@@ -11,6 +11,7 @@
- #include <cstddef> //size_t
- #include <cstdint> // [u]intXX_t
- #include <algorithm> // since some people like to forget that one
-+#include <stdexcept>
-
- namespace cvv
- {
diff --git a/ports/opencv3/0004-fix-eigen.patch b/ports/opencv3/0004-fix-eigen.patch
new file mode 100644
index 000000000..ec8f6a489
--- /dev/null
+++ b/ports/opencv3/0004-fix-eigen.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
+index 3753084..0aeb31a 100644
+--- a/cmake/OpenCVFindLibsPerf.cmake
++++ b/cmake/OpenCVFindLibsPerf.cmake
+@@ -55,7 +55,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN)
+ OR NOT (CMAKE_VERSION VERSION_LESS "3.0.0") # Eigen3Targets.cmake required CMake 3.0.0+
+ ) AND NOT OPENCV_SKIP_EIGEN_FIND_PACKAGE_CONFIG
+ )
+- find_package(Eigen3 CONFIG QUIET) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING)
++ find_package(Eigen3 CONFIG REQUIRED) # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING)
+ endif()
+ if(NOT Eigen3_FOUND)
+ find_package(Eigen3 QUIET)
diff --git a/ports/opencv3/0009-fix-uwp.patch b/ports/opencv3/0006-fix-uwp.patch
index 9968d8691..551372950 100644
--- a/ports/opencv3/0009-fix-uwp.patch
+++ b/ports/opencv3/0006-fix-uwp.patch
@@ -1,8 +1,8 @@
diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake
-index 10ee406..73f4af2 100644
+index efb6ca8..8ca8609 100644
--- a/cmake/OpenCVModule.cmake
+++ b/cmake/OpenCVModule.cmake
-@@ -1183,7 +1183,7 @@ function(ocv_add_perf_tests)
+@@ -1184,7 +1184,7 @@ function(ocv_add_perf_tests)
set_target_properties(${the_target} PROPERTIES FOLDER "tests performance")
endif()
diff --git a/ports/opencv3/0007-fix-hdf5.patch b/ports/opencv3/0007-fix-hdf5.patch
new file mode 100644
index 000000000..de81c79b2
--- /dev/null
+++ b/ports/opencv3/0007-fix-hdf5.patch
@@ -0,0 +1,30 @@
+diff --git a/modules/hdf/CMakeLists.txt b/modules/hdf/CMakeLists.txt
+index 2a1ae68..e40a192 100644
+--- a/modules/hdf/CMakeLists.txt
++++ b/modules/hdf/CMakeLists.txt
+@@ -1,25 +1,8 @@
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
+
+-if(WIN32)
+- # windows cmake internal lookups are broken for now
+- # will lookup for headers and shared libs given HDF_DIR env
+- find_path(HDF5_INCLUDE_DIRS hdf5.h HINTS "$ENV{HDF5_DIR}\\..\\include")
+- find_library(HDF5_C_LIBRARY NAMES hdf5 HINTS "$ENV{HDF5_DIR}\\..\\lib")
+- if(HDF5_INCLUDE_DIRS AND HDF5_C_LIBRARY)
+- set(HDF5_FOUND "YES")
+- set(HDF5_LIBRARIES ${HDF5_C_LIBRARY})
+- mark_as_advanced(HDF5_LIBRARIES)
+- mark_as_advanced(HDF5_C_LIBRARY)
+- mark_as_advanced(HDF5_INCLUDE_DIRS)
+- add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB -D_HDF5USEDLL_)
+- else()
+- set(HDF5_FOUND "NO")
+- endif()
+-else()
+ if(NOT CMAKE_CROSSCOMPILING) # iOS build should not reuse OSX package
+ find_package(HDF5)
+ endif()
+-endif()
+
+ if(NOT HDF5_FOUND)
+ ocv_module_disable(hdf) # no return
diff --git a/ports/opencv3/0010-devendor-quirc.patch b/ports/opencv3/0008-devendor-quirc.patch
index 1d2d7ccb7..b77b1780e 100644
--- a/ports/opencv3/0010-devendor-quirc.patch
+++ b/ports/opencv3/0008-devendor-quirc.patch
@@ -1,26 +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/CMakeLists.txt b/CMakeLists.txt
+index 5810b0c..04315e3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -771,7 +771,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/portfile.cmake b/ports/opencv3/portfile.cmake
index 4345a1c2f..8b62f7ddc 100644
--- a/ports/opencv3/portfile.cmake
+++ b/ports/opencv3/portfile.cmake
@@ -6,21 +6,22 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4")
message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4")
endif()
-set(OPENCV_VERSION "3.4.12")
+set(OPENCV_VERSION "3.4.13")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO opencv/opencv
REF ${OPENCV_VERSION}
- SHA512 e69ff4869a8128b7d2a0537d198ec7f287fb821a8965df26339bec662da1888860941f50a269db7693309b9861f986c219288bb5856de76a6c7bc4c0a7026bee
+ SHA512 ec87b10534b9187c5ac2eea498c05c73bceab08afaed93b5a117ed34d1eeeb0ffc45901642bebf8f55126fd49ec78d731fc61debe6b40d8642f1323b5dbbeacf
HEAD_REF master
PATCHES
0001-disable-downloading.patch
0002-install-options.patch
0003-force-package-requirements.patch
+ 0004-fix-eigen.patch
0005-fix-vtk9.patch
- 0009-fix-uwp.patch
- 0010-devendor-quirc.patch
+ 0006-fix-uwp.patch
+ 0008-devendor-quirc.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@@ -113,10 +114,10 @@ if("contrib" IN_LIST FEATURES)
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
REPO opencv/opencv_contrib
REF ${OPENCV_VERSION}
- SHA512 0191b1d49d5a50195ed94951c570da03dc33677b682e61a65b34d40f355c36a58441034730ea7eca78dcb4af4c821983754250f93fdf3adb2b4a20e71806eb03
+ SHA512 49f0aed8e07a443f354859a16c8de5ceae26560f141721ae4beb0d5fcc5b24b755ee313519e159b1a5b6ba125dcca8584f2a515e0ac96a8c9c36bb11ac6b3375
HEAD_REF master
PATCHES
- 0004-add-missing-stdexcept-include.patch
+ 0007-fix-hdf5.patch
)
set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules")
diff --git a/ports/opencv3/vcpkg.json b/ports/opencv3/vcpkg.json
index c977a0132..42041c4c1 100644
--- a/ports/opencv3/vcpkg.json
+++ b/ports/opencv3/vcpkg.json
@@ -1,7 +1,6 @@
{
"name": "opencv3",
- "version": "3.4.12",
- "port-version": 1,
+ "version": "3.4.13",
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"dependencies": [
@@ -11,6 +10,7 @@
"dnn",
"jpeg",
"png",
+ "quirc",
"tiff",
"webp"
],