[OpenCV] update to v4.6.0 (#25431)

* [OpenCV] update to v3.4.18 and v4.6.0
enable python2 in vcpkg-get-python-package

* fix references

* remove python2 from testing

* restore python2 tests only on windows&x64

* fix references

* [OpenCV2] add jasper patch

* fix references

* update handling multiple versions

* add usage files

* [dbow] fix build

* [dbow] fix version

* fix references

* remove ipp from vcpkg-ci-opencv for opencv3

* [OpenCV2] fix CRT linking with static libs

* fix references

* [dbow3] add support clause now that is CI tested
[cctag] enable opencv4, fix build on osx

* fix references

* [OpenCV2] fix patch

* fix references

* [libharu] bump version

* fix references

* [rtabmap] fix for opencv 4.6

* [rtabmap] fix manifest

* fix references

* remove llvm dependency to ease CI load

* version

* overwrite version

* fixes for mingw

* add mingw patch

* fix references

* [OpenCV2] fix generated config on win32

* fix references

* update version

* update version

* overwrite baseline

* cleanup after merge

* fix references

* [openmvs] trying to diagnose the problem - DO NOT MERGE

* fix references

* restore port version

* fix references

* Revert "[openmvs] trying to diagnose the problem - DO NOT MERGE"

This reverts commit 8bfd0ff4f9.

* Revert "fix references"

This reverts commit 0e915f6eef.

* skip opencv2 and opencv3

* remove again opencv2/3 from vcpkg-ci-opencv

* apply fixes from review

* fix references

* wrong checksum (tested on windows)

* Github-actions fixes (#2)

* Update opencv4.json

* fix github-actions issues

* formating vcpkg.json

* update git-trees

* fix rtabmap license

* fix references

* fix also dbow3 license

* fix references

* [cctag] remove unnecessary patch section

* fix references

Co-authored-by: Frank <65999885+FrankXie05@users.noreply.github.com>
Co-authored-by: FrankXie <v-frankxie@microsoft.com>
Co-authored-by: Matthieu Penant <matthieu.penant@seika.ca>
Co-authored-by: Matthieu Penant <thieum22@hotmail.com>
This commit is contained in:
Stefano Sinigardi 2022-08-05 02:21:59 +02:00 committed by GitHub
parent 5e77198e98
commit acb370dd6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 1510 additions and 1639 deletions

View File

@ -0,0 +1,11 @@
--- a/src/cctag/utils/Exceptions.hpp
+++ b/src/cctag/utils/Exceptions.hpp
@@ -7,7 +7,7 @@
*/
#ifndef _CCTAG_EXCEPTIONS_HPP_
#define _CCTAG_EXCEPTIONS_HPP_
-
+#define _GNU_SOURCE
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/errinfo_file_name.hpp>
#include <boost/exception/exception.hpp>

View File

@ -4,6 +4,8 @@ vcpkg_from_github(
REF v1.0.2 REF v1.0.2
SHA512 ccd62f6b1ca55035a08660052f38e73866260d5295490864fa9c86af779a42ce2ec727d6c88f0ea38f205903cf8f4107069b690849e432219c74d3b9666e3ae2 SHA512 ccd62f6b1ca55035a08660052f38e73866260d5295490864fa9c86af779a42ce2ec727d6c88f0ea38f205903cf8f4107069b690849e432219c74d3b9666e3ae2
HEAD_REF develop HEAD_REF develop
PATCHES
0001-fix-osx.patch
) )
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -15,7 +17,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
if("cuda" IN_LIST FEATURES) if("cuda" IN_LIST FEATURES)
include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake) include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake)
vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT)
message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}") message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}")
endif() endif()
@ -30,7 +31,7 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CCTag)
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
# remove test files # remove test files
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cctag/geometry/test" "${CURRENT_PACKAGES_DIR}/include/cctag/test") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/cctag/geometry/test" "${CURRENT_PACKAGES_DIR}/include/cctag/test")
@ -45,4 +46,4 @@ if ("apps" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES ${CCTAG_TOOLS} AUTO_CLEAN) vcpkg_copy_tools(TOOL_NAMES ${CCTAG_TOOLS} AUTO_CLEAN)
endif() endif()
file(INSTALL ${SOURCE_PATH}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctag RENAME copyright) file(INSTALL "${SOURCE_PATH}/COPYING.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,6 +1,7 @@
{ {
"name": "cctag", "name": "cctag",
"version-semver": "1.0.2", "version-semver": "1.0.2",
"port-version": 1,
"maintainers": "alicevision-team@googlegroups.com", "maintainers": "alicevision-team@googlegroups.com",
"description": "Computer vision library for detecting CCTag markers made up of concentric circles", "description": "Computer vision library for detecting CCTag markers made up of concentric circles",
"homepage": "https://github.com/alicevision/CCTag", "homepage": "https://github.com/alicevision/CCTag",
@ -32,7 +33,7 @@
"boost-type-traits", "boost-type-traits",
"boost-unordered", "boost-unordered",
"eigen3", "eigen3",
"opencv3", "opencv",
"tbb", "tbb",
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
#the port produces some empty dlls when building shared libraries, since some components do not export anything, breaking the internal build itself vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO rmsalinas/DBow3 REPO rmsalinas/DBow3
@ -8,25 +9,20 @@ vcpkg_from_github(
fix_cmake.patch fix_cmake.patch
) )
vcpkg_cmake_configure(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS OPTIONS
-DUSE_SIMD=ON
-DUSE_OPENCV_CONTRIB=ON -DUSE_OPENCV_CONTRIB=ON
-DBUILD_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF -DBUILD_TESTS=OFF
) )
vcpkg_install_cmake() vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/DBow3) vcpkg_cmake_config_fixup(CONFIG_PATH cmake/DBow3)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL vcpkg_copy_pdbs()
${SOURCE_PATH}/LICENSE.txt
DESTINATION ${CURRENT_PACKAGES_DIR}/share/DBow3 RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_copy_pdbs()

View File

@ -1,14 +1,25 @@
{ {
"name": "dbow3", "name": "dbow3",
"version-string": "1.0.0", "version": "1.0.0",
"port-version": 1, "port-version": 2,
"description": "DBoW3 is an improved version of the DBow2 library, an open source C++ library for indexing and converting images into a bag-of-word representation.", "description": "DBoW3 is an improved version of the DBow2 library, an open source C++ library for indexing and converting images into a bag-of-word representation.",
"homepage": "https://github.com/rmsalinas/DBow3",
"license": "BSD-3-Clause",
"supports": "linux",
"dependencies": [ "dependencies": [
{ {
"name": "opencv3", "name": "opencv",
"features": [ "features": [
"contrib" "contrib"
] ]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
} }
] ]
} }

View File

@ -1 +1,9 @@
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVConfig-version.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVModules.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVModules-release.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
if (NOT VCPKG_BUILD_TYPE)
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opencv4/OpenCVModules-debug.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endif()

View File

@ -1,9 +1,9 @@
{ {
"name": "opencv", "name": "opencv",
"version": "4.5.5", "version": "4.6.0",
"port-version": 1,
"description": "Computer vision library", "description": "Computer vision library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0",
"dependencies": [ "dependencies": [
{ {
"name": "opencv4", "name": "opencv4",

View File

@ -90,22 +90,30 @@
+ set(3P_LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}") + set(3P_LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}")
+ set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib") + set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib")
+ set(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}") + set(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}")
+ set(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/opencv/samples") + set(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/opencv2/samples")
+ set(OPENCV_INCLUDE_INSTALL_PATH "include") + set(OPENCV_INCLUDE_INSTALL_PATH "include/opencv2.4")
+ set(OPENCV_CONFIG_INSTALL_PATH "share/opencv") + set(OPENCV_CONFIG_INSTALL_PATH "share/opencv2")
endif() endif()
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}")
@@ -356,7 +327,7 @@ endif() @@ -354,15 +325,8 @@ if(INSTALL_TO_MANGLED_PATHS)
set(OPENCV_INCLUDE_INSTALL_PATH ${OPENCV_INCLUDE_INSTALL_PATH}/opencv-${OPENCV_VERSION})
endif()
if(WIN32) -if(WIN32)
# Postfix of DLLs: - # Postfix of DLLs:
- set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}") - set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
+ set(OPENCV_DLLVERSION "") + set(OPENCV_DLLVERSION 2)
set(OPENCV_DEBUG_POSTFIX d) set(OPENCV_DEBUG_POSTFIX d)
else() -else()
# Postfix of so's: - # Postfix of so's:
@@ -397,8 +368,6 @@ if(CMAKE_HOST_WIN32) - set(OPENCV_DLLVERSION "")
- set(OPENCV_DEBUG_POSTFIX "")
-endif()
if(DEFINED CMAKE_DEBUG_POSTFIX)
set(OPENCV_DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
@@ -397,8 +361,6 @@ if(CMAKE_HOST_WIN32)
endif() endif()
endif() endif()
@ -114,7 +122,7 @@
if(GIT_EXECUTABLE) if(GIT_EXECUTABLE)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*" execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*"
@@ -501,7 +470,9 @@ if(BUILD_DOCS) @@ -501,7 +463,9 @@ if(BUILD_DOCS)
endif(BUILD_DOCS) endif(BUILD_DOCS)
# --- Python Support --- # --- Python Support ---
@ -125,7 +133,7 @@
# --- Java Support --- # --- Java Support ---
include(cmake/OpenCVDetectApacheAnt.cmake) include(cmake/OpenCVDetectApacheAnt.cmake)
@@ -885,11 +853,7 @@ if(ANDROID) @@ -885,11 +849,7 @@ if(ANDROID)
endif() endif()
if(DEFINED WITH_FFMPEG OR HAVE_FFMPEG) if(DEFINED WITH_FFMPEG OR HAVE_FFMPEG)
@ -137,8 +145,6 @@
status(" avcodec:" FFMPEG_libavcodec_FOUND THEN "YES (ver ${FFMPEG_libavcodec_VERSION})" ELSE NO) status(" avcodec:" FFMPEG_libavcodec_FOUND THEN "YES (ver ${FFMPEG_libavcodec_VERSION})" ELSE NO)
status(" avformat:" FFMPEG_libavformat_FOUND THEN "YES (ver ${FFMPEG_libavformat_VERSION})" ELSE NO) status(" avformat:" FFMPEG_libavformat_FOUND THEN "YES (ver ${FFMPEG_libavformat_VERSION})" ELSE NO)
status(" avutil:" FFMPEG_libavutil_FOUND THEN "YES (ver ${FFMPEG_libavutil_VERSION})" ELSE NO) status(" avutil:" FFMPEG_libavutil_FOUND THEN "YES (ver ${FFMPEG_libavutil_VERSION})" ELSE NO)
diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake
index e61059a..ec6f34f 100644
--- a/cmake/OpenCVCompilerOptions.cmake --- a/cmake/OpenCVCompilerOptions.cmake
+++ b/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake
@@ -269,7 +269,6 @@ if(MSVC) @@ -269,7 +269,6 @@ if(MSVC)
@ -149,8 +155,6 @@ index e61059a..ec6f34f 100644
endif() endif()
if(ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES "/arch:") if(ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES "/arch:")
diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake
index 146043f..1202225 100644
--- a/cmake/OpenCVFindLibsVideo.cmake --- a/cmake/OpenCVFindLibsVideo.cmake
+++ b/cmake/OpenCVFindLibsVideo.cmake +++ b/cmake/OpenCVFindLibsVideo.cmake
@@ -185,12 +185,8 @@ endif(WITH_XIMEA) @@ -185,12 +185,8 @@ endif(WITH_XIMEA)
@ -197,6 +201,17 @@ index 146043f..1202225 100644
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_CONFIG_PATH}/include\" \"\${OpenCV_CONFIG_PATH}/include/opencv\"") set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_CONFIG_PATH}/include\" \"\${OpenCV_CONFIG_PATH}/include/opencv\"")
set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"") set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"")
--- a/cmake/OpenCVGenPkgconfig.cmake
+++ b/cmake/OpenCVGenPkgconfig.cmake
@@ -95,7 +95,7 @@ set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
if(INSTALL_TO_MANGLED_PATHS)
set(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
else()
- set(OPENCV_PC_FILE_NAME opencv.pc)
+ set(OPENCV_PC_FILE_NAME opencv2.pc)
endif()
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv-XXX.pc.in"
"${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME}"
--- a/cmake/OpenCVModule.cmake --- a/cmake/OpenCVModule.cmake
+++ b/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake
@@ -86,10 +86,10 @@ macro(ocv_add_dependencies full_modname) @@ -86,10 +86,10 @@ macro(ocv_add_dependencies full_modname)

View File

@ -1,5 +1,3 @@
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
index 72df4d4..7d45974 100644
--- a/cmake/OpenCVUtils.cmake --- a/cmake/OpenCVUtils.cmake
+++ b/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake
@@ -82,12 +82,42 @@ macro(ocv_check_environment_variables) @@ -82,12 +82,42 @@ macro(ocv_check_environment_variables)

View File

@ -0,0 +1,20 @@
--- a/modules/highgui/src/grfmt_jpeg2000.cpp
+++ b/modules/highgui/src/grfmt_jpeg2000.cpp
@@ -377,7 +377,7 @@ bool Jpeg2KDecoder::readComponent8u( uchar *data, void *_buffer,
for( y = 0; y < yend - ystart; )
{
- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
+ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
uchar* dst = data + (y - yoffset) * step - xoffset;
if( xstep == 1 )
@@ -443,7 +443,7 @@ bool Jpeg2KDecoder::readComponent16u( unsigned short *data, void *_buffer,
for( y = 0; y < yend - ystart; )
{
- jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
+ jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
ushort* dst = data + (y - yoffset) * step - xoffset;
if( xstep == 1 )

View File

@ -0,0 +1,18 @@
--- a/cmake/templates/OpenCVConfig.cmake.in
+++ b/cmake/templates/OpenCVConfig.cmake.in
@@ -97,7 +97,6 @@ set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS_CONFIGCMAKE@)
# Extract the directory where *this* file has been installed (determined at cmake run-time)
get_filename_component(OpenCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH CACHE)
-if(NOT WIN32 OR ANDROID)
if(ANDROID)
set(OpenCV_INSTALL_PATH "${OpenCV_CONFIG_PATH}/../../..")
else()
@@ -109,7 +108,6 @@ if(NOT WIN32 OR ANDROID)
else()
get_filename_component(OpenCV_INSTALL_PATH "${OpenCV_INSTALL_PATH}" REALPATH)
endif()
-endif()
# Presence of Android native camera wrappers
set(OpenCV_HAVE_ANDROID_CAMERA @HAVE_opencv_androidcamera@)

View File

@ -1,11 +1,3 @@
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3")
message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3")
endif()
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4")
message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4")
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents) file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents)
string(JSON OPENCV_VERSION GET "${_contents}" version) string(JSON OPENCV_VERSION GET "${_contents}" version)
@ -16,11 +8,13 @@ vcpkg_from_github(
SHA512 de7d24ac7ed78ac14673011cbecc477cae688b74222a972e553c95a557b5cb8e5913f97db525421d6a72af30998ca300112fa0b285daed65f65832eb2cf7241a SHA512 de7d24ac7ed78ac14673011cbecc477cae688b74222a972e553c95a557b5cb8e5913f97db525421d6a72af30998ca300112fa0b285daed65f65832eb2cf7241a
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0002-install-options.patch 0001-install-options.patch
0002-fix-paths-containing-symbols.patch
0003-force-package-requirements.patch 0003-force-package-requirements.patch
0004-add-ffmpeg-missing-defines.patch 0004-add-ffmpeg-missing-defines.patch
0005-fix-cuda.patch 0005-fix-cuda.patch
fix-path-contains-++-error.patch 0006-fix-jasper.patch
0007-fix-config.patch
) )
file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake") file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake")
@ -43,7 +37,7 @@ FEATURES
) )
set(WITH_MSMF ON) set(WITH_MSMF ON)
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
set(WITH_MSMF OFF) set(WITH_MSMF OFF)
endif() endif()
@ -56,25 +50,32 @@ if("gtk" IN_LIST FEATURES)
endif() endif()
endif() endif()
if("ffmpeg" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_UWP)
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}")
endif()
endif()
set(WITH_PYTHON OFF) set(WITH_PYTHON OFF)
if("python" IN_LIST FEATURES) if("python" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
message(STATUS "You need to manually ensure that python2 virtualenv module is installed")
message("This might require running")
message("wget https://bootstrap.pypa.io/pip/2.7/get-pip.py")
message("and then")
message("/usr/bin/python2 get-pip.py")
message("and finally")
message("pip install virtualenv")
message("On some system, these commands must be run as root, otherwise error about virtualenv module missing will persist!")
endif()
x_vcpkg_get_python_packages(PYTHON_VERSION "2" PACKAGES numpy OUT_PYTHON_VAR "PYTHON2") x_vcpkg_get_python_packages(PYTHON_VERSION "2" PACKAGES numpy OUT_PYTHON_VAR "PYTHON2")
set(ENV{PYTHON} "${PYTHON2}") set(ENV{PYTHON} "${PYTHON2}")
set(WITH_PYTHON ON) set(WITH_PYTHON ON)
endif() endif()
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT_LNK)
vcpkg_cmake_configure( vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}" SOURCE_PATH "${SOURCE_PATH}"
OPTIONS OPTIONS
###### ocv_options ###### ocv_options
-DCMAKE_DEBUG_POSTFIX=d -DCMAKE_DEBUG_POSTFIX=d
-DBUILD_WITH_STATIC_CRT=${STATIC_CRT_LNK}
-DINSTALL_TO_MANGLED_PATHS=OFF
# Do not build docs/examples # Do not build docs/examples
-DBUILD_DOCS=OFF -DBUILD_DOCS=OFF
-DBUILD_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF
@ -110,11 +111,11 @@ vcpkg_cmake_configure(
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) file(READ "${CURRENT_PACKAGES_DIR}/share/opencv2/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro) set(DEPS_STRING "include(CMakeFindDependencyMacro)
find_dependency(Threads)") find_dependency(Threads)")
@ -145,7 +146,7 @@ find_dependency(Qt5 COMPONENTS OpenGL)")
string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)"
"set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}") "set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv2/OpenCVModules.cmake" "${OPENCV_MODULES}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif() endif()
@ -157,4 +158,6 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
configure_file("${CURRENT_PORT_DIR}/usage.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

4
ports/opencv2/usage.in Normal file
View File

@ -0,0 +1,4 @@
The package ${PORT} is compatible with CMake if you set the OpenCV_DIR *before* the find_package call
set(OpenCV_DIR "${CURRENT_INSTALLED_DIR}/share/${PORT}")
find_package(OpenCV REQUIRED)

View File

@ -1,11 +1,11 @@
{ {
"name": "opencv2", "name": "opencv2",
"version": "2.4.13.7", "version": "2.4.13.7",
"port-version": 13, "port-version": 14,
"description": "Open Source Computer Vision Library", "description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"supports": "!uwp", "supports": "!uwp & !(arm & windows)",
"dependencies": [ "dependencies": [
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",

View File

@ -1,5 +1,3 @@
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
index 6dbeca9..08e2f4a 100644
--- a/cmake/OpenCVFindLibsGrfmt.cmake --- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake
@@ -5,6 +5,9 @@ @@ -5,6 +5,9 @@

View File

@ -0,0 +1,11 @@
--- a/modules/sfm/src/libmv_light/libmv/simple_pipeline/bundle.cc
+++ b/modules/sfm/src/libmv_light/libmv/simple_pipeline/bundle.cc
@@ -549,7 +549,7 @@ void EuclideanBundleCommonIntrinsics(
if (bundle_constraints & BUNDLE_NO_TRANSLATION) {
#if CERES_VERSION_MAJOR >= 3 || (CERES_VERSION_MAJOR >= 2 && CERES_VERSION_MINOR >= 1)
- problem.SetParameterization(current_camera_R_t,
+ problem.SetManifold(current_camera_R_t,
constant_translation_manifold);
#else
problem.SetParameterization(current_camera_R_t,

View File

@ -0,0 +1,15 @@
--- a/modules/freetype/CMakeLists.txt
+++ b/modules/freetype/CMakeLists.txt
@@ -3,8 +5,10 @@ if(APPLE_FRAMEWORK)
ocv_module_disable(freetype)
endif()
-ocv_check_modules(FREETYPE freetype2)
-ocv_check_modules(HARFBUZZ harfbuzz)
+if(WITH_FREETYPE)
+find_package(freetype CONFIG REQUIRED)
+find_package(harfbuzz CONFIG REQUIRED)
+endif()
if(OPENCV_INITIAL_PASS)
if(NOT FREETYPE_FOUND)

View File

@ -1,11 +1,3 @@
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv2")
message(FATAL_ERROR "OpenCV 2 is installed, please uninstall and try again:\n vcpkg remove opencv2")
endif()
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4")
message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4")
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents) file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents)
string(JSON OPENCV_VERSION GET "${_contents}" version) string(JSON OPENCV_VERSION GET "${_contents}" version)
@ -15,7 +7,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO opencv/opencv REPO opencv/opencv
REF ${OPENCV_VERSION} REF ${OPENCV_VERSION}
SHA512 2fa9243625309a1c12c916737c94f0e2f9566f0828469b148cc1683dd1b8db8d1d58f90a36cfcaa72052964a718929451f04cda5361d8b546a63da69217d040a SHA512 96bbeb9525325f17ba635a0b75126aae0a7b0daef211af45057a97abd5d31a57fc50f0e889a6dab614df9b7621a145e06c0d240f0a218f33df1217d9a19c510d
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0001-disable-downloading.patch 0001-disable-downloading.patch
@ -54,6 +46,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"eigen" WITH_EIGEN "eigen" WITH_EIGEN
"ffmpeg" WITH_FFMPEG "ffmpeg" WITH_FFMPEG
"flann" BUILD_opencv_flann "flann" BUILD_opencv_flann
"freetype" WITH_FREETYPE
"gdcm" WITH_GDCM "gdcm" WITH_GDCM
"gstreamer" WITH_GSTREAMER "gstreamer" WITH_GSTREAMER
"halide" WITH_HALIDE "halide" WITH_HALIDE
@ -73,7 +66,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"dc1394" WITH_1394 "dc1394" WITH_1394
) )
# Cannot use vcpkg_check_features() for "dnn", "gtk", "ipp", ovis", "python", "qt", "tbb" # Cannot use vcpkg_check_features() for "dnn", "gtk", ipp", "openmp", "ovis", "python", "qt", "tbb"
set(BUILD_opencv_dnn OFF) set(BUILD_opencv_dnn OFF)
if("dnn" IN_LIST FEATURES) if("dnn" IN_LIST FEATURES)
if(NOT VCPKG_TARGET_IS_ANDROID) if(NOT VCPKG_TARGET_IS_ANDROID)
@ -102,6 +95,15 @@ if("ipp" IN_LIST FEATURES)
set(WITH_IPP ON) set(WITH_IPP ON)
endif() endif()
set(WITH_OPENMP OFF)
if("openmp" IN_LIST FEATURES)
if(NOT VCPKG_TARGET_IS_OSX)
set(WITH_OPENMP ON)
else()
message(WARNING "The OpenMP feature is not supported on macOS")
endif()
endif()
set(BUILD_opencv_ovis OFF) set(BUILD_opencv_ovis OFF)
if("ovis" IN_LIST FEATURES) if("ovis" IN_LIST FEATURES)
set(BUILD_opencv_ovis ON) set(BUILD_opencv_ovis ON)
@ -113,10 +115,16 @@ if("tbb" IN_LIST FEATURES)
endif() endif()
set(WITH_PYTHON OFF) set(WITH_PYTHON OFF)
set(BUILD_opencv_python3 OFF)
if("python" IN_LIST FEATURES) if("python" IN_LIST FEATURES)
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3") if (VCPKG_LIBRARY_LINKAGE STREQUAL static AND VCPKG_TARGET_IS_WINDOWS)
set(ENV{PYTHON} "${PYTHON3}") message(WARNING "The python module is currently unsupported on Windows when building static OpenCV libraries")
set(WITH_PYTHON ON) else()
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3")
set(ENV{PYTHON} "${PYTHON3}")
set(BUILD_opencv_python3 ON)
set(WITH_PYTHON ON)
endif()
endif() endif()
if("dnn" IN_LIST FEATURES) if("dnn" IN_LIST FEATURES)
@ -140,13 +148,15 @@ if("contrib" IN_LIST FEATURES)
endif() endif()
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
REPO opencv/opencv_contrib REPO opencv/opencv_contrib
REF ${OPENCV_VERSION} REF ${OPENCV_VERSION}
SHA512 31bd55617d3a54fa020d4255e463c90caf41e10136c82a05c24ee19890f0cdc4fc049136874841dc84037dedb0562471ea0345ab1dcd5ad8a5b0218f24ae9a35 SHA512 a051497e61ae55f86c224044487fc2247a3bba1aa27031c4997c981ddf8402edf82f1dd0d307f562c638bc021cfd8bd42a723973f00ab25131495f84d33c5383
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0007-fix-hdf5.patch 0007-fix-hdf5.patch
0013-fix-ceres.patch
0016-fix-freetype-contrib.patch
) )
set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules")
@ -244,7 +254,7 @@ if(WITH_IPP)
endif() endif()
set(WITH_MSMF ON) set(WITH_MSMF ON)
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_MINGW)
set(WITH_MSMF OFF) set(WITH_MSMF OFF)
endif() endif()
@ -267,6 +277,16 @@ if("ffmpeg" IN_LIST FEATURES)
endif() endif()
endif() endif()
if("halide" IN_LIST FEATURES)
list(APPEND ADDITIONAL_BUILD_FLAGS
# Halide 13 requires C++17
"-DCMAKE_CXX_STANDARD=17"
"-DCMAKE_CXX_STANDARD_REQUIRED=ON"
"-DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON"
"-DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR}"
)
endif()
if("qt" IN_LIST FEATURES) if("qt" IN_LIST FEATURES)
list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON") list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON")
endif() endif()
@ -290,19 +310,20 @@ vcpkg_cmake_configure(
-DX86=${TARGET_IS_X86} -DX86=${TARGET_IS_X86}
-DARM=${TARGET_IS_ARM} -DARM=${TARGET_IS_ARM}
###### ocv_options ###### ocv_options
-DINSTALL_TO_MANGLED_PATHS=OFF
-DOpenCV_INSTALL_BINARIES_PREFIX= -DOpenCV_INSTALL_BINARIES_PREFIX=
-DOPENCV_BIN_INSTALL_PATH=bin -DOPENCV_BIN_INSTALL_PATH=bin
-DOPENCV_INCLUDE_INSTALL_PATH=include -DOPENCV_INCLUDE_INSTALL_PATH=include/opencv3
-DOPENCV_LIB_INSTALL_PATH=lib -DOPENCV_LIB_INSTALL_PATH=lib
-DOPENCV_3P_LIB_INSTALL_PATH=lib -DOPENCV_3P_LIB_INSTALL_PATH=lib/manual-link/opencv3_thirdparty
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv -DOPENCV_CONFIG_INSTALL_PATH=share/opencv3
-DINSTALL_TO_MANGLED_PATHS=OFF
-DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG -DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG
-DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE
-DCMAKE_DEBUG_POSTFIX=d -DCMAKE_DEBUG_POSTFIX=d
-DOPENCV_DLLVERSION= -DOPENCV_DLLVERSION=3
-DOPENCV_DEBUG_POSTFIX=d -DOPENCV_DEBUG_POSTFIX=d
-DOPENCV_GENERATE_SETUPVARS=OFF -DOPENCV_GENERATE_SETUPVARS=OFF
-DOPENCV_GENERATE_PKGCONFIG=ON
# Do not build docs/examples # Do not build docs/examples
-DBUILD_DOCS=OFF -DBUILD_DOCS=OFF
-DBUILD_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF
@ -321,6 +342,8 @@ vcpkg_cmake_configure(
-DBUILD_PROTOBUF=OFF -DBUILD_PROTOBUF=OFF
###### OpenCV Build components ###### OpenCV Build components
-DBUILD_opencv_apps=OFF -DBUILD_opencv_apps=OFF
-DBUILD_opencv_java=OFF
-DBUILD_opencv_js=OFF
-DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm}
-DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor}
-DBUILD_opencv_saliency=${BUILD_opencv_saliency} -DBUILD_opencv_saliency=${BUILD_opencv_saliency}
@ -351,14 +374,12 @@ vcpkg_cmake_configure(
###### customized properties ###### customized properties
## Options from vcpkg_check_features() ## Options from vcpkg_check_features()
${FEATURE_OPTIONS} ${FEATURE_OPTIONS}
-DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON
-DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR}
-DWITH_GTK=${WITH_GTK} -DWITH_GTK=${WITH_GTK}
-DWITH_QT=${WITH_QT} -DWITH_QT=${WITH_QT}
-DWITH_IPP=${WITH_IPP} -DWITH_IPP=${WITH_IPP}
-DWITH_MATLAB=OFF -DWITH_MATLAB=OFF
-DWITH_MSMF=${WITH_MSMF} -DWITH_MSMF=${WITH_MSMF}
-DWITH_OPENMP=OFF -DWITH_OPENMP=${WITH_OPENMP}
-DWITH_PROTOBUF=${BUILD_opencv_flann} -DWITH_PROTOBUF=${BUILD_opencv_flann}
-DWITH_PYTHON=${WITH_PYTHON} -DWITH_PYTHON=${WITH_PYTHON}
-DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF
@ -368,6 +389,7 @@ vcpkg_cmake_configure(
###### BUILD_options (mainly modules which require additional libraries) ###### BUILD_options (mainly modules which require additional libraries)
-DBUILD_opencv_ovis=${BUILD_opencv_ovis} -DBUILD_opencv_ovis=${BUILD_opencv_ovis}
-DBUILD_opencv_dnn=${BUILD_opencv_dnn} -DBUILD_opencv_dnn=${BUILD_opencv_dnn}
-DBUILD_opencv_python3=${BUILD_opencv_python3}
###### The following modules are disabled for UWP ###### The following modules are disabled for UWP
-DBUILD_opencv_quality=${BUILD_opencv_quality} -DBUILD_opencv_quality=${BUILD_opencv_quality}
###### Additional build flags ###### Additional build flags
@ -375,19 +397,19 @@ vcpkg_cmake_configure(
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if (NOT VCPKG_BUILD_TYPE)
# Update debug paths for libs in Android builds (e.g. sdk/native/staticlibs/armeabi-v7a) # Update debug paths for libs in Android builds (e.g. sdk/native/staticlibs/armeabi-v7a)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake" vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/opencv3/OpenCVModules-debug.cmake"
"\${_IMPORT_PREFIX}/sdk" "\${_IMPORT_PREFIX}/sdk"
"\${_IMPORT_PREFIX}/debug/sdk" "\${_IMPORT_PREFIX}/debug/sdk"
) )
endif() endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) file(READ "${CURRENT_PACKAGES_DIR}/share/opencv3/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro) set(DEPS_STRING "include(CMakeFindDependencyMacro)
if(${BUILD_opencv_flann}) if(${BUILD_opencv_flann})
find_dependency(Protobuf CONFIG REQUIRED) find_dependency(Protobuf CONFIG REQUIRED)
@ -441,7 +463,7 @@ find_dependency(Tesseract)")
string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)") string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)")
endif() endif()
if(BUILD_opencv_ovis) if(BUILD_opencv_ovis)
string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)") string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(freetype)")
endif() endif()
if("quirc" IN_LIST FEATURES) if("quirc" IN_LIST FEATURES)
string(APPEND DEPS_STRING "\nfind_dependency(quirc)") string(APPEND DEPS_STRING "\nfind_dependency(quirc)")
@ -479,7 +501,7 @@ find_dependency(Qt${USE_QT_VERSION} COMPONENTS OpenGL)")
"OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}")
endif() endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv3/OpenCVModules.cmake" "${OPENCV_MODULES}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
@ -489,6 +511,8 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/opencv/licenses")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/opencv")
if(VCPKG_TARGET_IS_ANDROID) if(VCPKG_TARGET_IS_ANDROID)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android")
@ -497,4 +521,6 @@ endif()
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
configure_file("${CURRENT_PORT_DIR}/usage.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

4
ports/opencv3/usage.in Normal file
View File

@ -0,0 +1,4 @@
The package ${PORT} is compatible with CMake if you set the OpenCV_DIR *before* the find_package call
set(OpenCV_DIR "${CURRENT_INSTALLED_DIR}/share/${PORT}")
find_package(OpenCV REQUIRED)

View File

@ -1,7 +1,6 @@
{ {
"name": "opencv3", "name": "opencv3",
"version": "3.4.16", "version": "3.4.18",
"port-version": 9,
"description": "Open Source Computer Vision Library", "description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
@ -50,6 +49,7 @@
"cudnn", "cudnn",
{ {
"name": "opencv3", "name": "opencv3",
"default-features": false,
"features": [ "features": [
"contrib" "contrib"
] ]
@ -125,6 +125,13 @@
"protobuf" "protobuf"
] ]
}, },
"freetype": {
"description": "Freetype support for opencv",
"dependencies": [
"freetype",
"harfbuzz"
]
},
"gdcm": { "gdcm": {
"description": "GDCM support for opencv", "description": "GDCM support for opencv",
"dependencies": [ "dependencies": [
@ -196,12 +203,16 @@
"opengl" "opengl"
] ]
}, },
"openmp": {
"description": "Enable openmp support for opencv"
},
"ovis": { "ovis": {
"description": "opencv_ovis module", "description": "opencv_ovis module",
"dependencies": [ "dependencies": [
"ogre", "ogre",
{ {
"name": "opencv3", "name": "opencv3",
"default-features": false,
"features": [ "features": [
"contrib" "contrib"
] ]
@ -215,7 +226,10 @@
] ]
}, },
"python": { "python": {
"description": "Python wrapper support for opencv" "description": "Python wrapper support for opencv",
"dependencies": [
"python3"
]
}, },
"qt": { "qt": {
"description": "Qt GUI support for opencv", "description": "Qt GUI support for opencv",
@ -236,14 +250,21 @@
"description": "opencv_sfm module", "description": "opencv_sfm module",
"dependencies": [ "dependencies": [
"ceres", "ceres",
"eigen3",
"gflags", "gflags",
"glog", "glog",
{ {
"name": "opencv3", "name": "opencv3",
"default-features": false,
"features": [ "features": [
"contrib" "contrib"
] ]
},
{
"name": "opencv3",
"default-features": false,
"features": [
"eigen"
]
} }
] ]
}, },
@ -262,6 +283,12 @@
"vtk": { "vtk": {
"description": "vtk support for opencv", "description": "vtk support for opencv",
"dependencies": [ "dependencies": [
{
"name": "opencv3",
"features": [
"contrib"
]
},
"vtk" "vtk"
] ]
}, },

View File

@ -11,8 +11,8 @@
--- a/modules/objdetect/CMakeLists.txt --- a/modules/objdetect/CMakeLists.txt
+++ b/modules/objdetect/CMakeLists.txt +++ b/modules/objdetect/CMakeLists.txt
@@ -2,7 +2,5 @@ set(the_description "Object Detection") @@ -2,7 +2,5 @@ js
ocv_define_module(objdetect opencv_core opencv_imgproc opencv_calib3d opencv_dnn WRAP java objc python js) )
if(HAVE_QUIRC) if(HAVE_QUIRC)
- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR) - get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR)

View File

@ -1,5 +1,3 @@
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
index 8ea5497..7ed3f6b 100644
--- a/cmake/OpenCVFindLibsGrfmt.cmake --- a/cmake/OpenCVFindLibsGrfmt.cmake
+++ b/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake
@@ -5,6 +5,9 @@ @@ -5,6 +5,9 @@

View File

@ -0,0 +1,11 @@
--- a/modules/sfm/src/libmv_light/libmv/simple_pipeline/bundle.cc
+++ b/modules/sfm/src/libmv_light/libmv/simple_pipeline/bundle.cc
@@ -549,7 +549,7 @@ void EuclideanBundleCommonIntrinsics(
if (bundle_constraints & BUNDLE_NO_TRANSLATION) {
#if CERES_VERSION_MAJOR >= 3 || (CERES_VERSION_MAJOR >= 2 && CERES_VERSION_MINOR >= 1)
- problem.SetParameterization(current_camera_R_t,
+ problem.SetManifold(current_camera_R_t,
constant_translation_manifold);
#else
problem.SetParameterization(current_camera_R_t,

View File

@ -1,11 +0,0 @@
--- a/modules/highgui/CMakeLists.txt
+++ b/modules/highgui/CMakeLists.txt
@@ -271,7 +271,7 @@ if(APPLE)
add_apple_compiler_options(${the_module})
endif()
-if(OPENCV_HIGHGUI_BUILTIN_BACKEND STREQUAL "WIN32UI" AND HAVE_OPENGL AND OPENGL_LIBRARIES)
+if(HAVE_OPENGL AND OPENGL_LIBRARIES)
ocv_target_link_libraries(${the_module} PRIVATE "${OPENGL_LIBRARIES}")
endif()

View File

@ -1,29 +0,0 @@
--- a/modules/videoio/cmake/detect_gstreamer.cmake
+++ b/modules/videoio/cmake/detect_gstreamer.cmake
@@ -44,6 +44,10 @@ if(NOT HAVE_GSTREAMER AND WIN32)
NAMES gstvideo gstvideo-1.0
PATHS ${env_paths}
PATH_SUFFIXES "lib")
+ find_library(GSTREAMER_audio_LIBRARY
+ NAMES gstvideo gstaudio-1.0
+ PATHS ${env_paths}
+ PATH_SUFFIXES "lib")
find_library(GSTREAMER_glib_LIBRARY
NAMES glib-2.0
@@ -63,6 +67,7 @@ if(NOT HAVE_GSTREAMER AND WIN32)
AND GSTREAMER_pbutils_LIBRARY
AND GSTREAMER_riff_LIBRARY
AND GSTREAMER_video_LIBRARY
+ AND GSTREAMER_audio_LIBRARY
AND GSTREAMER_glib_LIBRARY
AND GSTREAMER_gobject_LIBRARY)
file(STRINGS "${GSTREAMER_gst_INCLUDE_DIR}/gst/gstversion.h" ver_strings REGEX "#define +GST_VERSION_(MAJOR|MINOR|MICRO|NANO).*")
@@ -77,6 +82,7 @@ if(NOT HAVE_GSTREAMER AND WIN32)
${GSTREAMER_app_LIBRARY}
${GSTREAMER_riff_LIBRARY}
${GSTREAMER_video_LIBRARY}
+ ${GSTREAMER_audio_LIBRARY}
${GSTREAMER_pbutils_LIBRARY}
${GSTREAMER_glib_LIBRARY}
${GSTREAMER_gobject_LIBRARY})

View File

@ -0,0 +1,12 @@
--- a/modules/ovis/src/ovis.cpp
+++ b/modules/ovis/src/ovis.cpp
@@ -453,7 +453,8 @@ class WindowSceneImpl : public WindowScene
if(tus->getTextureName() != name)
{
RTShader::ShaderGenerator::getSingleton().invalidateMaterial(
- RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME, *bgplane->getMaterial());
+ RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME, bgplane->getMaterial()->getName(),
+ RESOURCEGROUP_NAME);
tus->setTextureName(name);
tus->setTextureAddressingMode(TAM_CLAMP);

View File

@ -1,5 +1,3 @@
diff --git a/modules/gapi/cmake/init.cmake b/modules/gapi/cmake/init.cmake
index 1c46432..43fb8ad 100644
--- a/modules/gapi/cmake/init.cmake --- a/modules/gapi/cmake/init.cmake
+++ b/modules/gapi/cmake/init.cmake +++ b/modules/gapi/cmake/init.cmake
@@ -20,10 +20,8 @@ if(NOT TARGET ade) @@ -20,10 +20,8 @@ if(NOT TARGET ade)

View File

@ -1,5 +1,3 @@
diff --git a/modules/freetype/CMakeLists.txt b/modules/freetype/CMakeLists.txt
index 6dd4aaf..e734e97 100644
--- a/modules/freetype/CMakeLists.txt --- a/modules/freetype/CMakeLists.txt
+++ b/modules/freetype/CMakeLists.txt +++ b/modules/freetype/CMakeLists.txt
@@ -3,8 +5,10 @@ if(APPLE_FRAMEWORK) @@ -3,8 +5,10 @@ if(APPLE_FRAMEWORK)

View File

@ -0,0 +1,15 @@
--- a/modules/videoio/src/cap_dshow.cpp
+++ b/modules/videoio/src/cap_dshow.cpp
@@ -90,8 +90,11 @@ Thanks to:
#if defined(__clang__) // clang or MSVC clang
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-#elif defined(__GNUC__) // MinGW
+#elif defined(__GNUC__) // gcc
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
+#ifdef __MINGW32__
#define STRSAFE_NO_DEPRECATE
#endif

View File

@ -1,11 +1,3 @@
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv2")
message(FATAL_ERROR "OpenCV 2 is installed, please uninstall and try again:\n vcpkg remove opencv2")
endif()
if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3")
message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3")
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents) file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents)
string(JSON OPENCV_VERSION GET "${_contents}" version) string(JSON OPENCV_VERSION GET "${_contents}" version)
@ -15,24 +7,23 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO opencv/opencv REPO opencv/opencv
REF ${OPENCV_VERSION} REF ${OPENCV_VERSION}
SHA512 4d1783fd78425cc43bb2153446dd634cedd366a49592bccc0c538a40aa161fcf67db8f1b6b68f1ce0b4a93504b3f06f65931709277afb1a1ee9fe963094bca02 SHA512 93d7807794682990b6a1d1de1851986ae3c5d1afe6605f3f8cace03ba5e3390bee2568bc0f335af34d3fc974df64cbce0ce685261ec2abd693d259b97b15bc46
FILE_DISAMBIGUATOR 1 FILE_DISAMBIGUATOR 1
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0001-disable-downloading.patch 0001-disable-downloading.patch
0002-install-options.patch 0002-install-options.patch
0003-force-package-requirements.patch 0003-force-package-requirements.patch
0004-fix-policy-CMP0057.patch 0004-fix-eigen.patch
0005-fix-eigen.patch 0005-fix-policy-CMP0057.patch
0006-fix-uwp.patch 0006-fix-uwp.patch
0008-devendor-quirc.patch 0008-devendor-quirc.patch
0009-fix-protobuf.patch 0009-fix-protobuf.patch
0010-fix-uwp-tiff-imgcodecs.patch 0010-fix-uwp-tiff-imgcodecs.patch
0011-remove-python2.patch 0011-remove-python2.patch
0012-fix-zlib.patch 0012-fix-zlib.patch
0013-fix-opengl.patch
0014-fix-gstreamer.patch
0015-fix-freetype.patch 0015-fix-freetype.patch
0017-mingw-strsafe-no-deprecate.patch
) )
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
@ -80,7 +71,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"dc1394" WITH_1394 "dc1394" WITH_1394
) )
# Cannot use vcpkg_check_features() for "dnn", "gtk", ipp", "openmp", "ovis", "python", "qt, "tbb" # Cannot use vcpkg_check_features() for "dnn", "gtk", ipp", "openmp", "ovis", "python", "qt", "tbb"
set(BUILD_opencv_dnn OFF) set(BUILD_opencv_dnn OFF)
if("dnn" IN_LIST FEATURES) if("dnn" IN_LIST FEATURES)
if(NOT VCPKG_TARGET_IS_ANDROID) if(NOT VCPKG_TARGET_IS_ANDROID)
@ -179,10 +170,12 @@ if("contrib" IN_LIST FEATURES)
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
REPO opencv/opencv_contrib REPO opencv/opencv_contrib
REF ${OPENCV_VERSION} REF ${OPENCV_VERSION}
SHA512 8469de524e8e6f4c50a74b8cbec5e4cfc48a63a6dfc787609696099eca40dc02b9dc7a347a014d4416fd4efd66955d3af5f4847f44612312a8362f453e6c2e35 SHA512 2e9cc9632774babf59cd186cd7b7edbd35a816bdda2acb51339c514a33fc6d8c3f1687eb3b0f6827304e3fcb0f9f3e81d47e8ab08239175750ac1240cc99dc5d
HEAD_REF master HEAD_REF master
PATCHES PATCHES
0007-fix-hdf5.patch 0007-fix-hdf5.patch
0013-fix-ceres.patch
0014-fix-ogre.patch
0016-fix-freetype-contrib.patch 0016-fix-freetype-contrib.patch
) )
set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules")
@ -322,7 +315,7 @@ if(WITH_IPP)
endif() endif()
set(WITH_MSMF ON) set(WITH_MSMF ON)
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_MINGW)
set(WITH_MSMF OFF) set(WITH_MSMF OFF)
endif() endif()
@ -369,17 +362,17 @@ vcpkg_cmake_configure(
-DX86=${TARGET_IS_X86} -DX86=${TARGET_IS_X86}
-DARM=${TARGET_IS_ARM} -DARM=${TARGET_IS_ARM}
###### ocv_options ###### ocv_options
-DINSTALL_TO_MANGLED_PATHS=OFF
-DOpenCV_INSTALL_BINARIES_PREFIX= -DOpenCV_INSTALL_BINARIES_PREFIX=
-DOPENCV_BIN_INSTALL_PATH=bin -DOPENCV_BIN_INSTALL_PATH=bin
-DOPENCV_INCLUDE_INSTALL_PATH=include -DOPENCV_INCLUDE_INSTALL_PATH=include
-DOPENCV_LIB_INSTALL_PATH=lib -DOPENCV_LIB_INSTALL_PATH=lib
-DOPENCV_3P_LIB_INSTALL_PATH=lib -DOPENCV_3P_LIB_INSTALL_PATH=lib/manual-link/opencv4_thirdparty
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv -DOPENCV_CONFIG_INSTALL_PATH=share/opencv4
-DINSTALL_TO_MANGLED_PATHS=OFF
-DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG -DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG
-DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE
-DCMAKE_DEBUG_POSTFIX=d -DCMAKE_DEBUG_POSTFIX=d
-DOPENCV_DLLVERSION= -DOPENCV_DLLVERSION=4
-DOPENCV_DEBUG_POSTFIX=d -DOPENCV_DEBUG_POSTFIX=d
-DOPENCV_GENERATE_SETUPVARS=OFF -DOPENCV_GENERATE_SETUPVARS=OFF
-DOPENCV_GENERATE_PKGCONFIG=ON -DOPENCV_GENERATE_PKGCONFIG=ON
@ -436,9 +429,9 @@ vcpkg_cmake_configure(
-DWITH_IPP=${WITH_IPP} -DWITH_IPP=${WITH_IPP}
-DWITH_MATLAB=OFF -DWITH_MATLAB=OFF
-DWITH_MSMF=${WITH_MSMF} -DWITH_MSMF=${WITH_MSMF}
-DWITH_PYTHON=${WITH_PYTHON}
-DWITH_OPENMP=${WITH_OPENMP} -DWITH_OPENMP=${WITH_OPENMP}
-DWITH_PROTOBUF=${BUILD_opencv_dnn} -DWITH_PROTOBUF=${BUILD_opencv_dnn}
-DWITH_PYTHON=${WITH_PYTHON}
-DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENCLAMDBLAS=OFF
-DWITH_TBB=${WITH_TBB} -DWITH_TBB=${WITH_TBB}
-DWITH_OPENJPEG=OFF -DWITH_OPENJPEG=OFF
@ -457,19 +450,19 @@ vcpkg_cmake_configure(
) )
vcpkg_cmake_install() vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") if (NOT VCPKG_BUILD_TYPE)
# Update debug paths for libs in Android builds (e.g. sdk/native/staticlibs/armeabi-v7a) # Update debug paths for libs in Android builds (e.g. sdk/native/staticlibs/armeabi-v7a)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules-debug.cmake" vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/opencv4/OpenCVModules-debug.cmake"
"\${_IMPORT_PREFIX}/sdk" "\${_IMPORT_PREFIX}/sdk"
"\${_IMPORT_PREFIX}/debug/sdk" "\${_IMPORT_PREFIX}/debug/sdk"
) )
endif() endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(READ "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" OPENCV_MODULES) file(READ "${CURRENT_PACKAGES_DIR}/share/opencv4/OpenCVModules.cmake" OPENCV_MODULES)
set(DEPS_STRING "include(CMakeFindDependencyMacro) set(DEPS_STRING "include(CMakeFindDependencyMacro)
if(${BUILD_opencv_dnn}) if(${BUILD_opencv_dnn})
find_dependency(Protobuf CONFIG REQUIRED) find_dependency(Protobuf CONFIG REQUIRED)
@ -561,7 +554,7 @@ find_dependency(Qt${USE_QT_VERSION} COMPONENTS OpenGL)")
"OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}")
endif() endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake" "${OPENCV_MODULES}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv4/OpenCVModules.cmake" "${OPENCV_MODULES}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
@ -571,6 +564,8 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/opencv4/licenses")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/opencv")
if(VCPKG_TARGET_IS_ANDROID) if(VCPKG_TARGET_IS_ANDROID)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android")
@ -579,4 +574,6 @@ endif()
vcpkg_fixup_pkgconfig() vcpkg_fixup_pkgconfig()
configure_file("${CURRENT_PORT_DIR}/usage.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

5
ports/opencv4/usage.in Normal file
View File

@ -0,0 +1,5 @@
If you do not install the meta-port *opencv*, the package ${PORT} is compatible with CMake
if you set the OpenCV_DIR *before* the find_package call
set(OpenCV_DIR "${CURRENT_INSTALLED_DIR}/share/${PORT}")
find_package(OpenCV REQUIRED)

View File

@ -1,7 +1,6 @@
{ {
"name": "opencv4", "name": "opencv4",
"version": "4.5.5", "version": "4.6.0",
"port-version": 7,
"description": "computer vision library", "description": "computer vision library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -1,14 +1,3 @@
From 37a2b1fe682bcea48cb944762853bec404c9e937 Mon Sep 17 00:00:00 2001
From: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
Date: Sun, 6 Feb 2022 12:29:02 -0800
Subject: [PATCH] add bigobj for msvc
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5cdae617..ed829a46 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -106,6 +106,7 @@ if(MSVC) @@ -106,6 +106,7 @@ if(MSVC)
@ -19,6 +8,3 @@ index 5cdae617..ed829a46 100644
endif() endif()
# [Eclipse] Automatic Discovery of Include directories (Optional, but handy) # [Eclipse] Automatic Discovery of Include directories (Optional, but handy)
--
2.35.1.windows.2

View File

@ -0,0 +1,11 @@
--- a/corelib/src/MarkerDetector.cpp
+++ b/corelib/src/MarkerDetector.cpp
@@ -304,7 +304,7 @@ std::map<int, MarkerInfo> MarkerDetector::detect(const cv::Mat & image,
std::map<int, MarkerInfo>::iterator iter = detections.find(ids[i]);
if(iter!=detections.end())
{
- cv::aruco::drawAxis(*imageWithDetections, model.K(), model.D(), rvecs[i], tvecs[i], iter->second.length() * 0.5f);
+ cv::drawFrameAxes(*imageWithDetections, model.K(), model.D(), rvecs[i], tvecs[i], iter->second.length() * 0.5f);
}
}
}

View File

@ -1,13 +1,3 @@
From a9f8c032bb7915c075f0fb32a0bbfa633ca3b388 Mon Sep 17 00:00:00 2001
Date: Wed, 7 Jul 2021 15:13:43 -0400
Subject: [PATCH] Fix Qt
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5cdae617..fe98199b 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -966,13 +966,13 @@ IF(ANDROID) @@ -966,13 +966,13 @@ IF(ANDROID)
@ -26,6 +16,3 @@ index 5cdae617..fe98199b 100644
ENDIF() ENDIF()
IF(BUILD_TOOLS) IF(BUILD_TOOLS)
--
2.32.0.windows.1

View File

@ -7,8 +7,9 @@ vcpkg_from_github(
SHA512 7787d5f927f53554cec3044221011cbc78b654c504d96af29947266e25058194923c5463aefde73b93dcfb3930eedf731f6af4d0c311d8f2f0d7be2114393e05 SHA512 7787d5f927f53554cec3044221011cbc78b654c504d96af29947266e25058194923c5463aefde73b93dcfb3930eedf731f6af4d0c311d8f2f0d7be2114393e05
HEAD_REF master HEAD_REF master
PATCHES PATCHES
fix-qt.patch
0001-add-bigobj-for-msvc.patch 0001-add-bigobj-for-msvc.patch
0002-fix-opencv46.patch
0003-fix-qt.patch
) )
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -90,7 +91,7 @@ if("tools" IN_LIST FEATURES)
) )
endif() endif()
file(REMOVE_RECURSE file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/share"
) )

View File

@ -1,12 +1,16 @@
{ {
"name": "rtabmap", "name": "rtabmap",
"version": "0.20.13", "version": "0.20.13",
"port-version": 3, "port-version": 4,
"description": "Real-Time Appearance-Based Mapping", "description": "Real-Time Appearance-Based Mapping",
"homepage": "https://introlab.github.io/rtabmap/", "homepage": "https://introlab.github.io/rtabmap/",
"license": "BSD-3-Clause",
"supports": "windows & !static", "supports": "windows & !static",
"dependencies": [ "dependencies": [
"opencv", {
"name": "opencv",
"default-features": false
},
{ {
"name": "pcl", "name": "pcl",
"default-features": false, "default-features": false,
@ -24,7 +28,22 @@
}, },
"zlib" "zlib"
], ],
"default-features": [
"opencv-contrib"
],
"features": { "features": {
"opencv-contrib": {
"description": "Use OpenCV with contrib modules",
"dependencies": [
{
"name": "opencv",
"default-features": false,
"features": [
"contrib"
]
}
]
},
"tools": { "tools": {
"description": "Build tools", "description": "Build tools",
"dependencies": [ "dependencies": [

View File

@ -1,7 +1,6 @@
{ {
"name": "vcpkg-get-python-packages", "name": "vcpkg-get-python-packages",
"version-date": "2022-04-11", "version-date": "2022-06-30",
"port-version": 1,
"documentation": "https://vcpkg.io/en/docs/README.html", "documentation": "https://vcpkg.io/en/docs/README.html",
"license": "MIT", "license": "MIT",
"supports": "native" "supports": "native"

View File

@ -31,21 +31,32 @@ function(x_vcpkg_get_python_packages)
get_filename_component(python_dir "${arg_PYTHON_EXECUTABLE}" DIRECTORY) get_filename_component(python_dir "${arg_PYTHON_EXECUTABLE}" DIRECTORY)
set(ENV{PYTHONNOUSERSITE} "1") set(ENV{PYTHONNOUSERSITE} "1")
if("${python_dir}" MATCHES "(${DOWNLOADS}|${CURRENT_HOST_INSTALLED_DIR})" AND CMAKE_HOST_WIN32) # inside vcpkg and windows host. if("${python_dir}" MATCHES "(${DOWNLOADS}|${CURRENT_HOST_INSTALLED_DIR})" AND CMAKE_HOST_WIN32) # inside vcpkg and windows host.
#if(NOT EXISTS "${python_dir}/python310._pth" AND PYTHON_EXECUTABLE MATCHES "python3") #if(NOT EXISTS "${python_dir}/python310._pth" AND PYTHON_EXECUTABLE MATCHES "python3")
# file(COPY "${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-get-python-packages/python310._pth" DESTINATION "${python_dir}") # file(COPY "${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-get-python-packages/python310._pth" DESTINATION "${python_dir}")
#endif() #endif()
if(NOT EXISTS "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}") if(NOT EXISTS "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
if(NOT EXISTS "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}") if(NOT EXISTS "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
vcpkg_from_github( if(arg_PYTHON_VERSION STREQUAL 3)
OUT_SOURCE_PATH PYFILE_PATH vcpkg_from_github(
REPO pypa/get-pip OUT_SOURCE_PATH PYFILE_PATH
REF 38e54e5de07c66e875c11a1ebbdb938854625dd8 #2022-03-07 REPO pypa/get-pip
SHA512 431a9f66618a2f251db3a8c3311e7fc3af3ff7364ec1d14a99f1b9c237646b6146cef8b9471d83e1086dba2ed448bccc48d99b2bb375e4235d78e76d9970d3e5 REF 38e54e5de07c66e875c11a1ebbdb938854625dd8 #2022-03-07
) SHA512 431a9f66618a2f251db3a8c3311e7fc3af3ff7364ec1d14a99f1b9c237646b6146cef8b9471d83e1086dba2ed448bccc48d99b2bb375e4235d78e76d9970d3e5
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/public/get-pip.py" --no-warn-script-location )
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE_PATH}/public/get-pip.py" --no-warn-script-location
LOGNAME "get-pip-${TARGET_TRIPLET}") WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "get-pip-${TARGET_TRIPLET}")
elseif(arg_PYTHON_VERSION STREQUAL 2)
vcpkg_download_distfile(PYFILE
URLS "https://bootstrap.pypa.io/pip/2.7/get-pip.py"
FILENAME "get-pip.py"
SHA512 8c74bdaff57a2dcf2aa69c4c218b7d5f3bf4a470dbda2d7c8d1b53862c84e2a83cd04c3cd20cf80dc0e4076b113a734413e31d6a9853f41e894398e7f88f848e
)
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" "${PYFILE}" --no-warn-script-location
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "get-pip-${TARGET_TRIPLET}")
endif()
endif() endif()
vcpkg_execute_required_process(COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install virtualenv --no-warn-script-location vcpkg_execute_required_process(COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install virtualenv --no-warn-script-location
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
@ -58,23 +69,29 @@ function(x_vcpkg_get_python_packages)
endif() endif()
set(venv_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-venv") set(venv_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-venv")
file(REMOVE_RECURSE "${venv_path}") # Remove old venv file(REMOVE_RECURSE "${venv_path}") # Remove old venv
file(MAKE_DIRECTORY "${venv_path}") file(MAKE_DIRECTORY "${venv_path}")
if(CMAKE_HOST_WIN32) if(CMAKE_HOST_WIN32)
file(MAKE_DIRECTORY "${python_dir}/DLLs") file(MAKE_DIRECTORY "${python_dir}/DLLs")
set(python_sub_path /Scripts) set(python_sub_path /Scripts)
set(python_venv virtualenv) set(python_venv virtualenv)
file(COPY "${python_dir}/python310.zip" DESTINATION "${venv_path}/Scripts") if(arg_PYTHON_VERSION STREQUAL 3)
file(COPY "${python_dir}/python310.zip" DESTINATION "${venv_path}/Scripts")
endif()
set(python_venv_options "--app-data" "${venv_path}/data") set(python_venv_options "--app-data" "${venv_path}/data")
else() else()
set(python_sub_path /bin) set(python_sub_path /bin)
set(python_venv venv) if(arg_PYTHON_VERSION STREQUAL 3)
set(python_venv venv)
elseif(arg_PYTHON_VERSION STREQUAL 2)
set(python_venv virtualenv)
endif()
set(python_venv_options --symlinks) set(python_venv_options --symlinks)
endif() endif()
set(ENV{PYTHONNOUSERSITE} "1") set(ENV{PYTHONNOUSERSITE} "1")
message(STATUS "Setting up python virtual environmnent...") message(STATUS "Setting up python virtual environmnent...")
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -m "${python_venv}" ${python_venv_options} "${venv_path}" vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -m "${python_venv}" ${python_venv_options} "${venv_path}"
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "venv-setup-${TARGET_TRIPLET}") LOGNAME "venv-setup-${TARGET_TRIPLET}")
vcpkg_add_to_path(PREPEND "${venv_path}${python_sub_path}") vcpkg_add_to_path(PREPEND "${venv_path}${python_sub_path}")
set(${arg_OUT_PYTHON_VAR} "${venv_path}${python_sub_path}/python${VCPKG_HOST_EXECUTABLE_SUFFIX}") set(${arg_OUT_PYTHON_VAR} "${venv_path}${python_sub_path}/python${VCPKG_HOST_EXECUTABLE_SUFFIX}")
@ -83,14 +100,14 @@ function(x_vcpkg_get_python_packages)
unset(ENV{PYTHONPATH}) unset(ENV{PYTHONPATH})
if(DEFINED arg_REQUIREMENTS_FILE) if(DEFINED arg_REQUIREMENTS_FILE)
message(STATUS "Installing requirements from: ${arg_REQUIREMENTS_FILE}") message(STATUS "Installing requirements from: ${arg_REQUIREMENTS_FILE}")
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install -r ${arg_REQUIREMENTS_FILE} vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install -r ${arg_REQUIREMENTS_FILE}
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "pip-install-requirements-file-${TARGET_TRIPLET}") LOGNAME "pip-install-requirements-file-${TARGET_TRIPLET}")
endif() endif()
if(DEFINED arg_PACKAGES) if(DEFINED arg_PACKAGES)
message(STATUS "Installing python packages: ${arg_PACKAGES}") message(STATUS "Installing python packages: ${arg_PACKAGES}")
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install ${arg_PACKAGES} vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install ${arg_PACKAGES}
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
LOGNAME "pip-install-packages-${TARGET_TRIPLET}") LOGNAME "pip-install-packages-${TARGET_TRIPLET}")
endif() endif()
message(STATUS "Setting up python virtual environmnent...finished.") message(STATUS "Setting up python virtual environmnent...finished.")

View File

@ -770,24 +770,24 @@ opencl:arm-uwp=fail
opencl:x64-uwp=fail opencl:x64-uwp=fail
opencsg:arm-uwp=fail opencsg:arm-uwp=fail
opencsg:x64-uwp=fail opencsg:x64-uwp=fail
opencv2:arm64-windows = skip opencv2:arm64-windows = skip
opencv2:arm-uwp = skip opencv2:arm-uwp = skip
opencv2:x64-linux = skip opencv2:x64-linux = skip
opencv2:x64-osx = skip opencv2:x64-osx = skip
opencv2:x64-uwp = skip opencv2:x64-uwp = skip
opencv2:x64-windows = skip opencv2:x64-windows = skip
opencv2:x64-windows-static = skip opencv2:x64-windows-static = skip
opencv2:x64-windows-static-md=skip opencv2:x64-windows-static-md = skip
opencv2:x86-windows = skip opencv2:x86-windows = skip
opencv3:arm64-windows = skip opencv3:arm64-windows = skip
opencv3:arm-uwp = skip opencv3:arm-uwp = skip
opencv3:x64-linux = skip opencv3:x64-linux = skip
opencv3:x64-osx = skip opencv3:x64-osx = skip
opencv3:x64-uwp = skip opencv3:x64-uwp = skip
opencv3:x64-windows = skip opencv3:x64-windows = skip
opencv3:x64-windows-static = skip opencv3:x64-windows-static = skip
opencv3:x64-windows-static-md=skip opencv3:x64-windows-static-md = skip
opencv3:x86-windows = skip opencv3:x86-windows = skip
opendnp3:x64-uwp=fail opendnp3:x64-uwp=fail
opendnp3:arm-uwp=fail opendnp3:arm-uwp=fail
openexr:arm64-windows=fail openexr:arm64-windows=fail

View File

@ -1310,7 +1310,7 @@
}, },
"cctag": { "cctag": {
"baseline": "1.0.2", "baseline": "1.0.2",
"port-version": 0 "port-version": 1
}, },
"cctz": { "cctz": {
"baseline": "2.3", "baseline": "2.3",
@ -1854,7 +1854,7 @@
}, },
"dbow3": { "dbow3": {
"baseline": "1.0.0", "baseline": "1.0.0",
"port-version": 1 "port-version": 2
}, },
"dcmtk": { "dcmtk": {
"baseline": "3.6.7", "baseline": "3.6.7",
@ -5189,20 +5189,20 @@
"port-version": 0 "port-version": 0
}, },
"opencv": { "opencv": {
"baseline": "4.5.5", "baseline": "4.6.0",
"port-version": 1 "port-version": 0
}, },
"opencv2": { "opencv2": {
"baseline": "2.4.13.7", "baseline": "2.4.13.7",
"port-version": 13 "port-version": 14
}, },
"opencv3": { "opencv3": {
"baseline": "3.4.16", "baseline": "3.4.18",
"port-version": 9 "port-version": 0
}, },
"opencv4": { "opencv4": {
"baseline": "4.5.5", "baseline": "4.6.0",
"port-version": 7 "port-version": 0
}, },
"opendnp3": { "opendnp3": {
"baseline": "3.1.1", "baseline": "3.1.1",
@ -6374,7 +6374,7 @@
}, },
"rtabmap": { "rtabmap": {
"baseline": "0.20.13", "baseline": "0.20.13",
"port-version": 3 "port-version": 4
}, },
"rtaudio": { "rtaudio": {
"baseline": "2021-11-16", "baseline": "2021-11-16",
@ -7449,8 +7449,8 @@
"port-version": 1 "port-version": 1
}, },
"vcpkg-get-python-packages": { "vcpkg-get-python-packages": {
"baseline": "2022-04-11", "baseline": "2022-06-30",
"port-version": 1 "port-version": 0
}, },
"vcpkg-gfortran": { "vcpkg-gfortran": {
"baseline": "3", "baseline": "3",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "979f28c0cc646b1a4c057ee810772a6b8964b65a",
"version-semver": "1.0.2",
"port-version": 1
},
{ {
"git-tree": "41cef2a0749658a793585a55c57cb701e0845427", "git-tree": "41cef2a0749658a793585a55c57cb701e0845427",
"version-semver": "1.0.2", "version-semver": "1.0.2",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "0942151a7555bcac51e84d94474111ca96ff5974",
"version": "1.0.0",
"port-version": 2
},
{ {
"git-tree": "d0cbeaf64e4827fa69b0c07f21c6d0d689305559", "git-tree": "d0cbeaf64e4827fa69b0c07f21c6d0d689305559",
"version-string": "1.0.0", "version-string": "1.0.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "135db832c720c800e2ac222994aa216df7575d17",
"version": "4.6.0",
"port-version": 0
},
{ {
"git-tree": "1ed18903421ae513e731348b2e5afb13c8c38d24", "git-tree": "1ed18903421ae513e731348b2e5afb13c8c38d24",
"version": "4.5.5", "version": "4.5.5",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "5161f9b494cb04f39503980cdca10bdac6e7ee53",
"version": "2.4.13.7",
"port-version": 14
},
{ {
"git-tree": "5dad4c606f120b7d208ec193036596bd82074e81", "git-tree": "5dad4c606f120b7d208ec193036596bd82074e81",
"version": "2.4.13.7", "version": "2.4.13.7",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "15c9083efa4c00674bef4fbca443a662fe6dd5cd",
"version": "3.4.18",
"port-version": 0
},
{ {
"git-tree": "8d02d89d9531e2243b81f37f97a9be943fd6b0a0", "git-tree": "8d02d89d9531e2243b81f37f97a9be943fd6b0a0",
"version": "3.4.16", "version": "3.4.16",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "1ff543272c91a32d242ad5320e9ca63b29b34ed2",
"version": "4.6.0",
"port-version": 0
},
{ {
"git-tree": "8e165720af85f0da853cf0a4ac9eb5cb20804d13", "git-tree": "8e165720af85f0da853cf0a4ac9eb5cb20804d13",
"version": "4.5.5", "version": "4.5.5",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "b51506f789882022d1af0556521079694ce5cf62",
"version": "0.20.13",
"port-version": 4
},
{ {
"git-tree": "cf41f524585ec0c2dd5b8c7d8b455a79265b62ea", "git-tree": "cf41f524585ec0c2dd5b8c7d8b455a79265b62ea",
"version": "0.20.13", "version": "0.20.13",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "e65762bfef05a4d380bb171409c48a694fb35435",
"version-date": "2022-06-30",
"port-version": 0
},
{ {
"git-tree": "ffe13ab59e3e2f4f003498035bc1fbc06b64e164", "git-tree": "ffe13ab59e3e2f4f003498035bc1fbc06b64e164",
"version-date": "2022-04-11", "version-date": "2022-04-11",