[OpenCV] update to v4.5.4 and v3.4.16 (#20658)

* Make gtk4.4 build.

* Update baseline for gtk

* Fix vcpkg version.

* Fix vcpkg version.

* [gtk] Fix macos build.

* [gtk] Fix linux build.

* [gtk] Add patches.

* [gtk] Bump versions - again

* Fix macos patch.

* Bump versions.

* [OpenCV] update to v4.5.4 and v3.4.16

* fix patches

* [OpenCV] fix references

* fix patches

* update references

* add gstreamer support

* fix references

* fixes

* update references

* Install xdamage.

* Bump versions.

* [fontconfig] disable doc building which is failing on bare linux

* fix references

* [opencv] use qt6

* [opencv2] use newer approach to downstream dependency handling

* fix references

* Add merged patch from upstream.

* [gtk] Bump version.

* [OpenCV] restore using qt5

* [opencv] force qt5

* update references

* use a different strategy to find qt5 dependency for downstream projects

* fix references

* use a different strategy to find qt5 dependency for downstream projects also for opencv2

* fix references

* [opencv2] fix patches

* fix references

* Update ports/fontconfig/vcpkg.json

Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>

* fix references

* fix references, again

* add gtk to linux default features

* fix references

* [OpenCV2] fix cuda patch for newer cuda versions

* fix references

* [OpenCV2] add GTK feature

* fix references

* [opencv2] bump port version

* [opencv2] fix references

* Delete duplicate install of libxdamage-dev

* [fontconfig] bump version

* fix references

* [fontconfig] bump version

* fix references

* move vcpkg-ci-opencv to manifest

Co-authored-by: Berrysoft <Strawberry_Str@hotmail.com>
Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Stefano Sinigardi 2021-12-02 04:11:01 +01:00 committed by GitHub
parent 1b664707c1
commit f6601ee2e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 470 additions and 230 deletions

View File

@ -13,7 +13,11 @@ vcpkg_find_acquire_program(GPERF)
get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
vcpkg_add_to_path(${GPERF_PATH})
vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH})
vcpkg_configure_meson(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-Ddoc=disabled
)
vcpkg_install_meson(ADD_BIN_TO_PATH)
vcpkg_copy_pdbs()
@ -72,7 +76,7 @@ if(NOT VCPKG_TARGET_IS_WINDOWS)
endif()
if(VCPKG_TARGET_IS_WINDOWS)
# Unnecessary make rule creating the fontconfig cache dir on windows.
# Unnecessary make rule creating the fontconfig cache dir on windows.
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}LOCAL_APPDATA_FONTCONFIG_CACHE")
endif()

View File

@ -1,7 +1,7 @@
{
"name": "fontconfig",
"version": "2.13.94",
"port-version": 2,
"port-version": 3,
"description": "Library for configuring and customizing font access.",
"homepage": "https://www.freedesktop.org/wiki/Software/fontconfig",
"dependencies": [

View File

@ -1,6 +1,6 @@
{
"name": "opencv",
"version": "4.5.3",
"version": "4.5.4",
"description": "Computer vision library",
"homepage": "https://github.com/opencv/opencv",
"dependencies": [
@ -10,12 +10,7 @@
}
],
"default-features": [
"dnn",
"jpeg",
"png",
"quirc",
"tiff",
"webp"
"default-features"
],
"features": {
"ade": {
@ -66,6 +61,31 @@
}
]
},
"default-features": {
"description": "Platform-dependent default features",
"dependencies": [
{
"name": "opencv4",
"default-features": false,
"features": [
"dnn",
"jpeg",
"png",
"quirc",
"tiff",
"webp"
]
},
{
"name": "opencv4",
"default-features": false,
"features": [
"gtk"
],
"platform": "linux"
}
]
},
"dnn": {
"description": "Enable dnn module",
"dependencies": [
@ -114,6 +134,30 @@
}
]
},
"gstreamer": {
"description": "gstreamer support for opencv",
"dependencies": [
{
"name": "opencv4",
"default-features": false,
"features": [
"gstreamer"
]
}
]
},
"gtk": {
"description": "GTK support for opencv",
"dependencies": [
{
"name": "opencv4",
"default-features": false,
"features": [
"gtk"
]
}
]
},
"halide": {
"description": "Halide support for opencv",
"dependencies": [

View File

@ -1,5 +1,3 @@
diff --git a/3rdparty/libtiff/CMakeLists.txt b/3rdparty/libtiff/CMakeLists.txt
index b0e076f..3f7ade1 100644
--- a/3rdparty/libtiff/CMakeLists.txt
+++ b/3rdparty/libtiff/CMakeLists.txt
@@ -102,7 +102,7 @@ if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
@ -11,8 +9,6 @@ index b0e076f..3f7ade1 100644
set_target_properties(${TIFF_LIBRARY}
PROPERTIES
diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt
index 9387616..54ecc1a 100644
--- a/3rdparty/openexr/CMakeLists.txt
+++ b/3rdparty/openexr/CMakeLists.txt
@@ -55,7 +55,7 @@ if(MSVC AND CV_ICC)
@ -24,8 +20,6 @@ index 9387616..54ecc1a 100644
set_target_properties(IlmImf
PROPERTIES
diff --git a/3rdparty/tbb/CMakeLists.txt b/3rdparty/tbb/CMakeLists.txt
index fd8ef32..fe571a2 100644
--- a/3rdparty/tbb/CMakeLists.txt
+++ b/3rdparty/tbb/CMakeLists.txt
@@ -116,7 +116,7 @@ endif()
@ -37,8 +31,6 @@ index fd8ef32..fe571a2 100644
if(NOT __statvar EQUAL 0)
message(FATAL_ERROR "Failed to download TBB sources (${__statvar}): ${tbb_url}")
endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90e16c2..6601820 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -275,23 +275,10 @@ if (ANDROID)
@ -182,8 +174,6 @@ index 146043f..1202225 100644
endif(WITH_FFMPEG)
# --- VideoInput/DirectShow ---
diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake
index dacfbb1..3760866 100644
--- a/cmake/OpenCVGenConfig.cmake
+++ b/cmake/OpenCVGenConfig.cmake
@@ -101,7 +101,7 @@ endif()
@ -204,8 +194,6 @@ index dacfbb1..3760866 100644
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_CONFIG_PATH}/include\" \"\${OpenCV_CONFIG_PATH}/include/opencv\"")
set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"")
diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake
index 6f9fb0b..56f8879 100644
--- a/cmake/OpenCVModule.cmake
+++ b/cmake/OpenCVModule.cmake
@@ -86,10 +86,10 @@ macro(ocv_add_dependencies full_modname)
@ -250,8 +238,6 @@ index 6f9fb0b..56f8879 100644
set(OPENCV_MODULE_${m}_DEPS ${OPENCV_MODULE_${m}_DEPS} CACHE INTERNAL "Flattened dependencies of ${m} module")
set(OPENCV_MODULE_${m}_DEPS_EXT ${OPENCV_MODULE_${m}_DEPS_EXT} CACHE INTERNAL "Extra dependencies of ${m} module")
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index e3177bd..f902b2b 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -5,8 +5,6 @@ if(ANDROID)
@ -270,8 +256,6 @@ index e3177bd..f902b2b 100644
-endif()
\ No newline at end of file
+endif()
diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt
index d9de52d..be604dc 100644
--- a/modules/core/CMakeLists.txt
+++ b/modules/core/CMakeLists.txt
@@ -1,9 +1,9 @@
@ -286,8 +270,6 @@ index d9de52d..be604dc 100644
endif()
ocv_module_include_directories("${OpenCV_SOURCE_DIR}/modules/dynamicuda/include/" ${ZLIB_INCLUDE_DIR})
diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt
index d59e95a..ce7f87b 100644
--- a/modules/highgui/CMakeLists.txt
+++ b/modules/highgui/CMakeLists.txt
@@ -15,23 +15,23 @@ endif()

View File

@ -1,5 +1,3 @@
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
index 43c3b16..9b43066 100644
--- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
@@ -6,7 +6,7 @@

View File

@ -1,18 +1,18 @@
--- a/cmake/OpenCVDetectCUDA.cmake
+++ b/cmake/OpenCVDetectCUDA.cmake
@@ -51,7 +51,7 @@ if(CUDA_FOUND)
@@ -51,7 +51,6 @@ if(CUDA_FOUND)
message(STATUS "CUDA detected: " ${CUDA_VERSION})
- set(_generations "Fermi" "Kepler")
+ set(_generations "Kepler" "Maxwell")
if(NOT CMAKE_CROSSCOMPILING)
list(APPEND _generations "Auto")
endif()
@@ -70,14 +70,10 @@ if(CUDA_FOUND)
@@ -69,48 +68,8 @@ if(CUDA_FOUND)
unset(CUDA_ARCH_PTX CACHE)
endif()
set(__cuda_arch_ptx "")
- set(__cuda_arch_ptx "")
- if(CUDA_GENERATION STREQUAL "Fermi")
- set(__cuda_arch_bin "2.0 2.1(2.0)")
- elseif(CUDA_GENERATION STREQUAL "Kepler")
@ -21,76 +21,45 @@
- else()
- set(__cuda_arch_bin "3.0 3.5")
- endif()
+ if(CUDA_GENERATION STREQUAL "Kepler")
+ set(__cuda_arch_bin "3.0 3.5 3.7")
+ elseif(CUDA_GENERATION STREQUAL "Maxwell")
+ set(__cuda_arch_bin "5.0 5.2")
elseif(CUDA_GENERATION STREQUAL "Auto")
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
@@ -87,7 +83,6 @@ if(CUDA_FOUND)
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
else()
set(__cuda_arch_bin "${_nvcc_out}")
- elseif(CUDA_GENERATION STREQUAL "Auto")
- execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
- RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
- if(NOT _nvcc_res EQUAL 0)
- message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
- else()
- set(__cuda_arch_bin "${_nvcc_out}")
- string(REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin}")
endif()
endif()
@@ -102,11 +97,11 @@ if(CUDA_FOUND)
endif()
else()
if(${CUDA_VERSION} VERSION_LESS "5.0")
- endif()
- endif()
-
- if(NOT DEFINED __cuda_arch_bin)
- if(ANDROID)
- if (ARM)
- set(__cuda_arch_bin "3.2")
- set(__cuda_arch_ptx "")
- elseif(AARCH64)
- set(__cuda_arch_bin "5.3")
- set(__cuda_arch_ptx "")
- endif()
- else()
- if(${CUDA_VERSION} VERSION_LESS "5.0")
- set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
+ set(__cuda_arch_bin "3.0")
elseif(${CUDA_VERSION} VERSION_GREATER "6.5")
- elseif(${CUDA_VERSION} VERSION_GREATER "6.5")
- set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5")
+ set(__cuda_arch_bin "3.0 3.5")
else()
- else()
- set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
+ set(__cuda_arch_bin "3.0 3.5")
endif()
set(__cuda_arch_ptx "3.0")
endif()
diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in
index fe85571..0f9d2f5 100644
--- a/cmake/templates/OpenCVConfig.cmake.in
+++ b/cmake/templates/OpenCVConfig.cmake.in
@@ -256,7 +256,7 @@ if(OpenCV_CUDA_VERSION)
- endif()
- set(__cuda_arch_ptx "3.0")
- endif()
- endif()
+ set(__cuda_arch_ptx "5.0")
+ set(__cuda_arch_bin "5.0")
set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES})
- if(${CUDA_VERSION} VERSION_LESS "5.5")
+ if(CUDA_VERSION VERSION_LESS "5.5")
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY})
else()
find_cuda_helper_libs(nppc)
@@ -281,14 +281,16 @@ if(OpenCV_CUDA_VERSION)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES})
endif()
+ set(OpenCV_CUDA_LIBS_RELPATH "")
foreach(l ${OpenCV_CUDA_LIBS_ABSPATH})
- get_filename_component(_tmp "${l}" NAME_WE)
- string(REGEX REPLACE "^lib" "" _tmp "${_tmp}")
- if(NOT TARGET "opencv_dep_${_tmp}") # protect against repeated inclusions
- add_library("opencv_dep_${_tmp}" UNKNOWN IMPORTED)
- set_target_properties("opencv_dep_${_tmp}" PROPERTIES IMPORTED_LOCATION "${l}")
+ get_filename_component(_tmp ${l} PATH)
+ if(NOT ${_tmp} MATCHES "-Wl.*")
+ list(APPEND OpenCV_CUDA_LIBS_RELPATH ${_tmp})
endif()
endforeach()
+
+ list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH)
+ link_directories(${OpenCV_CUDA_LIBS_RELPATH})
endif()
# ==============================================================
diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake
index 30b5093..50dcdc9 100644
--- a/cmake/OpenCVDetectCUDA.cmake
+++ b/cmake/OpenCVDetectCUDA.cmake
@@ -229,18 +229,40 @@ else()
set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
set(CUDA_ARCH_PTX ${__cuda_arch_ptx} CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
@@ -229,18 +188,40 @@ else()
endif()
if(HAVE_CUDA)
@ -136,3 +105,36 @@ index 30b5093..50dcdc9 100644
+ ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY})
endif()
endif()
--- a/cmake/templates/OpenCVConfig.cmake.in
+++ b/cmake/templates/OpenCVConfig.cmake.in
@@ -256,7 +256,7 @@ if(OpenCV_CUDA_VERSION)
set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES})
- if(${CUDA_VERSION} VERSION_LESS "5.5")
+ if(CUDA_VERSION VERSION_LESS "5.5")
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY})
else()
find_cuda_helper_libs(nppc)
@@ -281,14 +281,16 @@ if(OpenCV_CUDA_VERSION)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES})
endif()
+ set(OpenCV_CUDA_LIBS_RELPATH "")
foreach(l ${OpenCV_CUDA_LIBS_ABSPATH})
- get_filename_component(_tmp "${l}" NAME_WE)
- string(REGEX REPLACE "^lib" "" _tmp "${_tmp}")
- if(NOT TARGET "opencv_dep_${_tmp}") # protect against repeated inclusions
- add_library("opencv_dep_${_tmp}" UNKNOWN IMPORTED)
- set_target_properties("opencv_dep_${_tmp}" PROPERTIES IMPORTED_LOCATION "${l}")
+ get_filename_component(_tmp ${l} PATH)
+ if(NOT ${_tmp} MATCHES "-Wl.*")
+ list(APPEND OpenCV_CUDA_LIBS_RELPATH ${_tmp})
endif()
endforeach()
+
+ list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH)
+ link_directories(${OpenCV_CUDA_LIBS_RELPATH})
endif()
# ==============================================================

View File

@ -52,6 +52,15 @@ if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
set(WITH_MSMF OFF)
endif()
set(WITH_GTK OFF)
if("gtk" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_LINUX)
set(WITH_GTK ON)
else()
message(WARNING "The gtk module cannot be enabled outside Linux")
endif()
endif()
if("ffmpeg" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_UWP)
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
@ -93,6 +102,7 @@ vcpkg_cmake_configure(
-DWITH_OPENCLAMDBLAS=OFF
-DWITH_OPENMP=OFF
-DWITH_ZLIB=ON
-WITH_GTK=${WITH_GTK}
-DWITH_CUBLAS=OFF # newer libcublas cannot be found by the old cuda cmake script in opencv2, requires a fix
)
@ -102,17 +112,35 @@ vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES)
string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)"
"set(CMAKE_IMPORT_FILE_VERSION 1)
find_package(CUDA QUIET)
find_package(Threads QUIET)
find_package(PNG QUIET)
find_package(OpenEXR QUIET)
set(DEPS_STRING "include(CMakeFindDependencyMacro)
find_dependency(Threads)")
if("tiff" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(TIFF)")
endif()
if("cuda" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(CUDA)")
endif()
if("openexr" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)")
endif()
if("png" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(PNG)")
endif()
if("qt" IN_LIST FEATURES)
string(APPEND DEPS_STRING "
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5 COMPONENTS OpenGL Concurrent Test QUIET)
find_package(TIFF QUIET)" OPENCV_MODULES "${OPENCV_MODULES}")
find_dependency(Qt5 COMPONENTS Core Gui Widgets Test Concurrent)")
if("opengl" IN_LIST FEATURES)
string(APPEND DEPS_STRING "
find_dependency(Qt5 COMPONENTS OpenGL)")
endif()
endif()
string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)"
"set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}")

View File

@ -1,7 +1,7 @@
{
"name": "opencv2",
"version": "2.4.13.7",
"port-version": 7,
"port-version": 8,
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"dependencies": [
@ -16,10 +16,7 @@
"zlib"
],
"default-features": [
"eigen",
"jpeg",
"png",
"tiff"
"default-features"
],
"features": {
"cuda": {
@ -28,6 +25,29 @@
"cuda"
]
},
"default-features": {
"description": "Platform-dependent default features",
"dependencies": [
{
"name": "opencv2",
"default-features": false,
"features": [
"eigen",
"jpeg",
"png",
"tiff"
]
},
{
"name": "opencv2",
"default-features": false,
"features": [
"gtk"
],
"platform": "linux"
}
]
},
"eigen": {
"description": "Eigen support for opencv",
"dependencies": [
@ -49,6 +69,12 @@
}
]
},
"gtk": {
"description": "GDCM support for opencv",
"dependencies": [
"gtk"
]
},
"jasper": {
"description": "JPEG 2000 support for opencv",
"dependencies": [

View File

@ -1,11 +0,0 @@
--- a/modules/dnn/src/caffe/caffe_io.cpp
+++ b/modules/dnn/src/caffe/caffe_io.cpp
@@ -1111,7 +1111,7 @@ static const int kProtoReadBytesLimit = INT_MAX; // Max size of 2 GB minus 1 by
bool ReadProtoFromBinary(ZeroCopyInputStream* input, Message *proto) {
CodedInputStream coded_input(input);
- coded_input.SetTotalBytesLimit(kProtoReadBytesLimit, 536870912);
+ coded_input.SetTotalBytesLimit(kProtoReadBytesLimit);
return proto->ParseFromCodedStream(&coded_input);
}

View File

@ -6,13 +6,14 @@ 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.15")
set(OPENCV_VERSION "3.4.16")
set(USE_QT_VERSION "5")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO opencv/opencv
REF ${OPENCV_VERSION}
SHA512 775149e56f0aa94d53eb024404866380d97ce423ef1c8343ee8f12c1377e454ae182b2528e86949b5f7250e551d464bd1a5de2e2d9f0d0e1dd3dc188a1db790d
SHA512 2fa9243625309a1c12c916737c94f0e2f9566f0828469b148cc1683dd1b8db8d1d58f90a36cfcaa72052964a718929451f04cda5361d8b546a63da69217d040a
HEAD_REF master
PATCHES
0001-disable-downloading.patch
@ -24,7 +25,6 @@ vcpkg_from_github(
0008-devendor-quirc.patch
0009-fix-protobuf.patch
0010-fix-uwp-tiff-imgcodecs.patch
0011-fix-caffe-io.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@ -43,32 +43,32 @@ string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"contrib" WITH_CONTRIB
"cuda" WITH_CUBLAS
"cuda" WITH_CUDA
"dnn" BUILD_opencv_dnn
"eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG
"flann" BUILD_opencv_flann
"gdcm" WITH_GDCM
"halide" WITH_HALIDE
"jasper" WITH_JASPER
"jpeg" WITH_JPEG
"lapack" WITH_LAPACK
"nonfree" OPENCV_ENABLE_NONFREE
"openexr" WITH_OPENEXR
"opengl" WITH_OPENGL
"png" WITH_PNG
"qt" WITH_QT
"quirc" WITH_QUIRC
"sfm" BUILD_opencv_sfm
"tiff" WITH_TIFF
"vtk" WITH_VTK
"webp" WITH_WEBP
"world" BUILD_opencv_world
"contrib" WITH_CONTRIB
"cuda" WITH_CUBLAS
"cuda" WITH_CUDA
"dnn" BUILD_opencv_dnn
"eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG
"flann" BUILD_opencv_flann
"gdcm" WITH_GDCM
"gstreamer" WITH_GSTREAMER
"halide" WITH_HALIDE
"jasper" WITH_JASPER
"jpeg" WITH_JPEG
"lapack" WITH_LAPACK
"nonfree" OPENCV_ENABLE_NONFREE
"openexr" WITH_OPENEXR
"opengl" WITH_OPENGL
"png" WITH_PNG
"quirc" WITH_QUIRC
"sfm" BUILD_opencv_sfm
"tiff" WITH_TIFF
"vtk" WITH_VTK
"webp" WITH_WEBP
"world" BUILD_opencv_world
)
# Cannot use vcpkg_check_features() for "dnn", "ipp", ovis", "tbb"
# Cannot use vcpkg_check_features() for "dnn", "gtk", "ipp", ovis", "qt", "tbb"
# As the respective value of their variables can be unset conditionally.
set(BUILD_opencv_dnn OFF)
if("dnn" IN_LIST FEATURES)
@ -79,6 +79,20 @@ if("dnn" IN_LIST FEATURES)
endif()
endif()
set(WITH_GTK OFF)
if("gtk" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_LINUX)
set(WITH_GTK ON)
else()
message(WARNING "The gtk module cannot be enabled outside Linux")
endif()
endif()
set(WITH_QT OFF)
if("qt" IN_LIST FEATURES)
set(WITH_QT ${USE_QT_VERSION})
endif()
set(WITH_IPP OFF)
if("ipp" IN_LIST FEATURES)
set(WITH_IPP ON)
@ -118,7 +132,7 @@ if("contrib" IN_LIST FEATURES)
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
REPO opencv/opencv_contrib
REF ${OPENCV_VERSION}
SHA512 639f5f869d68014fcc5041f5fe890c98635610d8b26c9964721e2fbe74ce8a12aef8f305364ff024fe0086bf2e7252c4fdd00a5de08854fdcd285c0f4916125a
SHA512 31bd55617d3a54fa020d4255e463c90caf41e10136c82a05c24ee19890f0cdc4fc049136874841dc84037dedb0562471ea0345ab1dcd5ad8a5b0218f24ae9a35
HEAD_REF master
PATCHES
0007-fix-hdf5.patch
@ -328,7 +342,8 @@ vcpkg_cmake_configure(
${FEATURE_OPTIONS}
-DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON
-DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR}
-DWITH_GTK=OFF
-DWITH_GTK=${WITH_GTK}
-DWITH_QT=${WITH_QT}
-DWITH_IPP=${WITH_IPP}
-DWITH_MATLAB=OFF
-DWITH_MSMF=${WITH_MSMF}
@ -415,7 +430,11 @@ find_dependency(Tesseract)")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)")
find_dependency(Qt${USE_QT_VERSION} COMPONENTS Core Gui Widgets Test Concurrent)")
if("opengl" IN_LIST FEATURES)
string(APPEND DEPS_STRING "
find_dependency(Qt${USE_QT_VERSION} COMPONENTS OpenGL)")
endif()
endif()
if("ade" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(ade)")

View File

@ -1,7 +1,6 @@
{
"name": "opencv3",
"version": "3.4.15",
"port-version": 3,
"version": "3.4.16",
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"dependencies": [
@ -16,12 +15,7 @@
"zlib"
],
"default-features": [
"dnn",
"jpeg",
"png",
"quirc",
"tiff",
"webp"
"default-features"
],
"features": {
"contrib": {
@ -56,6 +50,31 @@
}
]
},
"default-features": {
"description": "Platform-dependent default features",
"dependencies": [
{
"name": "opencv3",
"default-features": false,
"features": [
"dnn",
"jpeg",
"png",
"quirc",
"tiff",
"webp"
]
},
{
"name": "opencv3",
"default-features": false,
"features": [
"gtk"
],
"platform": "linux"
}
]
},
"dnn": {
"description": "Enable dnn module",
"dependencies": [
@ -100,6 +119,18 @@
"gdcm"
]
},
"gstreamer": {
"description": "gstreamer support for opencv",
"dependencies": [
"gstreamer"
]
},
"gtk": {
"description": "GTK support for opencv",
"dependencies": [
"gtk"
]
},
"halide": {
"description": "Halide support for opencv",
"dependencies": [

View File

@ -2,6 +2,6 @@
+++ b/modules/videoio/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.3)
set(VIDEOIO_PLUGIN_LIST "" CACHE STRING "List of videoio backends to be compiled as plugins (ffmpeg, gstreamer, mfx, msmf or special value 'all')")
set(VIDEOIO_ENABLE_PLUGINS "ON" CACHE BOOL "Allow building and using of videoio plugins")
mark_as_advanced(VIDEOIO_PLUGIN_LIST VIDEOIO_ENABLE_PLUGINS)
set(VIDEOIO_ENABLE_PLUGINS_DEFAULT ON)
if(EMSCRIPTEN OR IOS OR WINRT)
set(VIDEOIO_ENABLE_PLUGINS_DEFAULT OFF)

View File

@ -1,6 +1,6 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -803,7 +803,7 @@ if(WITH_OPENVX)
@@ -810,7 +810,7 @@ if(WITH_OPENVX)
endif()
if(WITH_QUIRC)
@ -12,7 +12,7 @@
--- 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)
ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d opencv_dnn WRAP java objc python js)
if(HAVE_QUIRC)
- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR)

View File

@ -1,13 +0,0 @@
diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp
index 2fc4d84..779d0dd 100644
--- a/modules/dnn/src/caffe/caffe_io.cpp
+++ b/modules/dnn/src/caffe/caffe_io.cpp
@@ -1111,7 +1111,7 @@ static const int kProtoReadBytesLimit = INT_MAX; // Max size of 2 GB minus 1 by
bool ReadProtoFromBinary(ZeroCopyInputStream* input, Message *proto) {
CodedInputStream coded_input(input);
- coded_input.SetTotalBytesLimit(kProtoReadBytesLimit, 536870912);
+ coded_input.SetTotalBytesLimit(kProtoReadBytesLimit);
return proto->ParseFromCodedStream(&coded_input);
}

View File

@ -6,13 +6,14 @@ if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3")
message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3")
endif()
set(OPENCV_VERSION "4.5.3")
set(OPENCV_VERSION "4.5.4")
set(USE_QT_VERSION "5")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO opencv/opencv
REF ${OPENCV_VERSION}
SHA512 efd2214f29b1eb2e1ae55280f9fc2f64af7c2e91154264c43d0d4186dd5b8f81e86942dff612d08cd9eaa834421457fe765760181160168cd4c52839a0739758
SHA512 39a7af95bc30d427c6df5e5d481469ab1ceea7878a93ae5c119991333e877a88d0a644e17dc6bd316e64b2840e48411a97f1b2397a8000719c5cec32751fa954
HEAD_REF master
PATCHES
0001-disable-downloading.patch
@ -24,7 +25,6 @@ vcpkg_from_github(
0008-devendor-quirc.patch
0009-fix-protobuf.patch
0010-fix-uwp-tiff-imgcodecs.patch
0011-fix-caffe-io.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@ -45,32 +45,32 @@ set(ADE_DIR ${CURRENT_INSTALLED_DIR}/share/ade CACHE PATH "Path to existing ADE
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"ade" WITH_ADE
"contrib" WITH_CONTRIB
"cuda" WITH_CUBLAS
"cuda" WITH_CUDA
"cudnn" WITH_CUDNN
"eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG
"gdcm" WITH_GDCM
"halide" WITH_HALIDE
"jasper" WITH_JASPER
"jpeg" WITH_JPEG
"lapack" WITH_LAPACK
"nonfree" OPENCV_ENABLE_NONFREE
"openexr" WITH_OPENEXR
"opengl" WITH_OPENGL
"png" WITH_PNG
"qt" WITH_QT
"quirc" WITH_QUIRC
"sfm" BUILD_opencv_sfm
"tiff" WITH_TIFF
"vtk" WITH_VTK
"webp" WITH_WEBP
"world" BUILD_opencv_world
"ade" WITH_ADE
"contrib" WITH_CONTRIB
"cuda" WITH_CUBLAS
"cuda" WITH_CUDA
"cudnn" WITH_CUDNN
"eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG
"gdcm" WITH_GDCM
"gstreamer" WITH_GSTREAMER
"halide" WITH_HALIDE
"jasper" WITH_JASPER
"jpeg" WITH_JPEG
"lapack" WITH_LAPACK
"nonfree" OPENCV_ENABLE_NONFREE
"openexr" WITH_OPENEXR
"opengl" WITH_OPENGL
"png" WITH_PNG
"quirc" WITH_QUIRC
"sfm" BUILD_opencv_sfm
"tiff" WITH_TIFF
"vtk" WITH_VTK
"webp" WITH_WEBP
"world" BUILD_opencv_world
)
# Cannot use vcpkg_check_features() for "dnn", ipp", "openmp", "ovis", "tbb"
# Cannot use vcpkg_check_features() for "dnn", "gtk", ipp", "openmp", "ovis", "qt, "tbb"
# As the respective value of their variables can be unset conditionally.
set(BUILD_opencv_dnn OFF)
if("dnn" IN_LIST FEATURES)
@ -81,6 +81,20 @@ if("dnn" IN_LIST FEATURES)
endif()
endif()
set(WITH_GTK OFF)
if("gtk" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_LINUX)
set(WITH_GTK ON)
else()
message(WARNING "The gtk module cannot be enabled outside Linux")
endif()
endif()
set(WITH_QT OFF)
if("qt" IN_LIST FEATURES)
set(WITH_QT ${USE_QT_VERSION})
endif()
set(BUILD_opencv_gapi ON)
if(VCPKG_TARGET_IS_UWP)
set(BUILD_opencv_gapi OFF)
@ -143,7 +157,7 @@ if("contrib" IN_LIST FEATURES)
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
REPO opencv/opencv_contrib
REF ${OPENCV_VERSION}
SHA512 5b48e2aedcf8c64fcfe80fad243c455c1bb9bfd10741c5ba03679ef26b28f61767fec632a9a9828a87a90542488354ebbbe8c65845bf2ae55b15a721c147a30a
SHA512 a48d4b5d764170814d9027fdf50f61bb4a24f0b5a547dded79d06b948f86443f14734efc7bbb708b3870781cafc6bc9e3092d35dac34a81da2bf1740d5f93ff9
HEAD_REF master
PATCHES
0007-fix-hdf5.patch
@ -385,7 +399,8 @@ vcpkg_cmake_configure(
${FEATURE_OPTIONS}
-DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON
-DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR}
-DWITH_GTK=OFF
-DWITH_GTK=${WITH_GTK}
-DWITH_QT=${WITH_QT}
-DWITH_IPP=${WITH_IPP}
-DWITH_MATLAB=OFF
-DWITH_MSMF=${WITH_MSMF}
@ -475,7 +490,11 @@ find_dependency(Tesseract)")
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)")
find_dependency(Qt${USE_QT_VERSION} COMPONENTS Core Gui Widgets Test Concurrent)")
if("opengl" IN_LIST FEATURES)
string(APPEND DEPS_STRING "
find_dependency(Qt${USE_QT_VERSION} COMPONENTS OpenGL)")
endif()
endif()
if("ade" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(ade)")

View File

@ -1,7 +1,6 @@
{
"name": "opencv4",
"version": "4.5.3",
"port-version": 3,
"version": "4.5.4",
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"dependencies": [
@ -16,12 +15,7 @@
"zlib"
],
"default-features": [
"dnn",
"jpeg",
"png",
"quirc",
"tiff",
"webp"
"default-features"
],
"features": {
"ade": {
@ -69,6 +63,31 @@
}
]
},
"default-features": {
"description": "Platform-dependent default features",
"dependencies": [
{
"name": "opencv4",
"default-features": false,
"features": [
"dnn",
"jpeg",
"png",
"quirc",
"tiff",
"webp"
]
},
{
"name": "opencv4",
"default-features": false,
"features": [
"gtk"
],
"platform": "linux"
}
]
},
"dnn": {
"description": "Enable dnn module",
"dependencies": [
@ -102,6 +121,18 @@
"gdcm"
]
},
"gstreamer": {
"description": "gstreamer support for opencv",
"dependencies": [
"gstreamer"
]
},
"gtk": {
"description": "GDCM support for opencv",
"dependencies": [
"gtk"
]
},
"halide": {
"description": "Halide support for opencv",
"dependencies": [

View File

@ -1,6 +0,0 @@
Source: vcpkg-ci-opencv
Version: 1
Port-Version: 3
Homepage: https://github.com/microsoft/vcpkg
Description: Port to force features of certain ports within CI
Build-Depends: opencv[cuda,cudnn,halide,ovis,tbb](windows&x64&!static&!uwp), opencv[gdcm,ipp,jasper,lapack,openexr,opengl,openmp,qt,sfm,vtk](!uwp&!(windows&(arm|arm64))), opencv[core,nonfree,ade,contrib,dnn,eigen,ffmpeg,jpeg,png,quirc,tiff,webp]

View File

@ -0,0 +1,61 @@
{
"name": "vcpkg-ci-opencv",
"version-string": "1",
"port-version": 4,
"description": "Port to force features of certain ports within CI",
"homepage": "https://github.com/microsoft/vcpkg",
"dependencies": [
{
"name": "opencv",
"default-features": false,
"features": [
"ade",
"contrib",
"dnn",
"eigen",
"ffmpeg",
"jpeg",
"nonfree",
"png",
"quirc",
"tiff",
"webp"
]
},
{
"name": "opencv",
"features": [
"gtk"
],
"platform": "linux"
},
{
"name": "opencv",
"features": [
"cuda",
"cudnn",
"gstreamer",
"halide",
"ovis",
"tbb"
],
"platform": "windows & x64 & !static & !uwp"
},
{
"name": "opencv",
"features": [
"gdcm",
"ipp",
"jasper",
"lapack",
"openexr",
"opengl",
"openmp",
"qt",
"sfm",
"vtk"
],
"platform": "!uwp & !(windows & (arm | arm64))"
}
]
}

View File

@ -2226,7 +2226,7 @@
},
"fontconfig": {
"baseline": "2.13.94",
"port-version": 2
"port-version": 3
},
"foonathan-memory": {
"baseline": "2019-07-21",
@ -4929,20 +4929,20 @@
"port-version": 2
},
"opencv": {
"baseline": "4.5.3",
"baseline": "4.5.4",
"port-version": 0
},
"opencv2": {
"baseline": "2.4.13.7",
"port-version": 7
"port-version": 8
},
"opencv3": {
"baseline": "3.4.15",
"port-version": 3
"baseline": "3.4.16",
"port-version": 0
},
"opencv4": {
"baseline": "4.5.3",
"port-version": 3
"baseline": "4.5.4",
"port-version": 0
},
"opendnp3": {
"baseline": "3.1.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6b0bf8a5aa81b6f10909b6d303be77553ca26011",
"version": "2.13.94",
"port-version": 3
},
{
"git-tree": "bc9133bf9d7f323757e7de9992ae6dbac0a92f00",
"version": "2.13.94",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7aaa340439ab4742d8e328a1069cd0923eba1072",
"version": "4.5.4",
"port-version": 0
},
{
"git-tree": "5b13218917e1efe74e37b28a13cfc8cc7572241e",
"version": "4.5.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e2c00be603dbf06283820dc2b2f6c04a77728a5f",
"version": "2.4.13.7",
"port-version": 8
},
{
"git-tree": "d6ccb4fb79829bcf58dd79950529d7086d6b277c",
"version": "2.4.13.7",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e55e479a0240978c0d0dee3cb79619e93b3825a3",
"version": "3.4.16",
"port-version": 0
},
{
"git-tree": "dee8e4cb055e92ed1708903f73dcca96b0793fe5",
"version": "3.4.15",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "35b4405de16e9116ce1e698827c2254a0b02b963",
"version": "4.5.4",
"port-version": 0
},
{
"git-tree": "d48f3aabd1d417854360efb92874f3b533f83966",
"version": "4.5.3",