mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:49:04 +08:00
[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 commit8bfd0ff4f9
. * Revert "fix references" This reverts commit0e915f6eef
. * 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:
parent
5e77198e98
commit
acb370dd6d
11
ports/cctag/0001-fix-osx.patch
Normal file
11
ports/cctag/0001-fix-osx.patch
Normal 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>
|
@ -4,6 +4,8 @@ vcpkg_from_github(
|
||||
REF v1.0.2
|
||||
SHA512 ccd62f6b1ca55035a08660052f38e73866260d5295490864fa9c86af779a42ce2ec727d6c88f0ea38f205903cf8f4107069b690849e432219c74d3b9666e3ae2
|
||||
HEAD_REF develop
|
||||
PATCHES
|
||||
0001-fix-osx.patch
|
||||
)
|
||||
|
||||
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)
|
||||
include(${CURRENT_INSTALLED_DIR}/share/cuda/vcpkg_find_cuda.cmake)
|
||||
vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT)
|
||||
|
||||
message(STATUS "CUDA_TOOLKIT_ROOT ${CUDA_TOOLKIT_ROOT}")
|
||||
endif()
|
||||
|
||||
@ -30,7 +31,7 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CCTag)
|
||||
|
||||
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
|
||||
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)
|
||||
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)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "cctag",
|
||||
"version-semver": "1.0.2",
|
||||
"port-version": 1,
|
||||
"maintainers": "alicevision-team@googlegroups.com",
|
||||
"description": "Computer vision library for detecting CCTag markers made up of concentric circles",
|
||||
"homepage": "https://github.com/alicevision/CCTag",
|
||||
@ -32,7 +33,7 @@
|
||||
"boost-type-traits",
|
||||
"boost-unordered",
|
||||
"eigen3",
|
||||
"opencv3",
|
||||
"opencv",
|
||||
"tbb",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rmsalinas/DBow3
|
||||
@ -8,25 +9,20 @@ vcpkg_from_github(
|
||||
fix_cmake.patch
|
||||
)
|
||||
|
||||
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DUSE_SIMD=ON
|
||||
-DUSE_OPENCV_CONTRIB=ON
|
||||
-DBUILD_EXAMPLES=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(INSTALL
|
||||
${SOURCE_PATH}/LICENSE.txt
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/DBow3 RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,14 +1,25 @@
|
||||
{
|
||||
"name": "dbow3",
|
||||
"version-string": "1.0.0",
|
||||
"port-version": 1,
|
||||
"version": "1.0.0",
|
||||
"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.",
|
||||
"homepage": "https://github.com/rmsalinas/DBow3",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "linux",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "opencv3",
|
||||
"name": "opencv",
|
||||
"features": [
|
||||
"contrib"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1 +1,9 @@
|
||||
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()
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "opencv",
|
||||
"version": "4.5.5",
|
||||
"port-version": 1,
|
||||
"version": "4.6.0",
|
||||
"description": "Computer vision library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "opencv4",
|
||||
|
@ -90,22 +90,30 @@
|
||||
+ set(3P_LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}")
|
||||
+ set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib")
|
||||
+ set(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}")
|
||||
+ set(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/opencv/samples")
|
||||
+ set(OPENCV_INCLUDE_INSTALL_PATH "include")
|
||||
+ set(OPENCV_CONFIG_INSTALL_PATH "share/opencv")
|
||||
+ set(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/opencv2/samples")
|
||||
+ set(OPENCV_INCLUDE_INSTALL_PATH "include/opencv2.4")
|
||||
+ set(OPENCV_CONFIG_INSTALL_PATH "share/opencv2")
|
||||
endif()
|
||||
|
||||
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)
|
||||
# Postfix of DLLs:
|
||||
-if(WIN32)
|
||||
- # Postfix of DLLs:
|
||||
- set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}")
|
||||
+ set(OPENCV_DLLVERSION "")
|
||||
+ set(OPENCV_DLLVERSION 2)
|
||||
set(OPENCV_DEBUG_POSTFIX d)
|
||||
else()
|
||||
# Postfix of so's:
|
||||
@@ -397,8 +368,6 @@ if(CMAKE_HOST_WIN32)
|
||||
-else()
|
||||
- # Postfix of so's:
|
||||
- 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()
|
||||
|
||||
@ -114,7 +122,7 @@
|
||||
|
||||
if(GIT_EXECUTABLE)
|
||||
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)
|
||||
|
||||
# --- Python Support ---
|
||||
@ -125,7 +133,7 @@
|
||||
|
||||
# --- Java Support ---
|
||||
include(cmake/OpenCVDetectApacheAnt.cmake)
|
||||
@@ -885,11 +853,7 @@ if(ANDROID)
|
||||
@@ -885,11 +849,7 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
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(" 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)
|
||||
diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake
|
||||
index e61059a..ec6f34f 100644
|
||||
--- a/cmake/OpenCVCompilerOptions.cmake
|
||||
+++ b/cmake/OpenCVCompilerOptions.cmake
|
||||
@@ -269,7 +269,6 @@ if(MSVC)
|
||||
@ -149,8 +155,6 @@ index e61059a..ec6f34f 100644
|
||||
endif()
|
||||
|
||||
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
|
||||
+++ b/cmake/OpenCVFindLibsVideo.cmake
|
||||
@@ -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(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
|
||||
+++ b/cmake/OpenCVModule.cmake
|
||||
@@ -86,10 +86,10 @@ macro(ocv_add_dependencies full_modname)
|
@ -1,5 +1,3 @@
|
||||
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
|
||||
index 72df4d4..7d45974 100644
|
||||
--- a/cmake/OpenCVUtils.cmake
|
||||
+++ b/cmake/OpenCVUtils.cmake
|
||||
@@ -82,12 +82,42 @@ macro(ocv_check_environment_variables)
|
20
ports/opencv2/0006-fix-jasper.patch
Normal file
20
ports/opencv2/0006-fix-jasper.patch
Normal 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 )
|
18
ports/opencv2/0007-fix-config.patch
Normal file
18
ports/opencv2/0007-fix-config.patch
Normal 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@)
|
@ -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)
|
||||
string(JSON OPENCV_VERSION GET "${_contents}" version)
|
||||
|
||||
@ -16,11 +8,13 @@ vcpkg_from_github(
|
||||
SHA512 de7d24ac7ed78ac14673011cbecc477cae688b74222a972e553c95a557b5cb8e5913f97db525421d6a72af30998ca300112fa0b285daed65f65832eb2cf7241a
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0002-install-options.patch
|
||||
0001-install-options.patch
|
||||
0002-fix-paths-containing-symbols.patch
|
||||
0003-force-package-requirements.patch
|
||||
0004-add-ffmpeg-missing-defines.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")
|
||||
@ -43,7 +37,7 @@ FEATURES
|
||||
)
|
||||
|
||||
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)
|
||||
endif()
|
||||
|
||||
@ -56,25 +50,32 @@ if("gtk" IN_LIST FEATURES)
|
||||
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)
|
||||
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")
|
||||
set(ENV{PYTHON} "${PYTHON2}")
|
||||
set(WITH_PYTHON ON)
|
||||
endif()
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT_LNK)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
###### ocv_options
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
-DBUILD_WITH_STATIC_CRT=${STATIC_CRT_LNK}
|
||||
-DINSTALL_TO_MANGLED_PATHS=OFF
|
||||
# Do not build docs/examples
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
@ -110,11 +111,11 @@ vcpkg_cmake_configure(
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv")
|
||||
vcpkg_cmake_config_fixup()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
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)
|
||||
find_dependency(Threads)")
|
||||
@ -145,7 +146,7 @@ find_dependency(Qt5 COMPONENTS OpenGL)")
|
||||
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}")
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv2/OpenCVModules.cmake" "${OPENCV_MODULES}")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
@ -157,4 +158,6 @@ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE")
|
||||
|
||||
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)
|
||||
|
4
ports/opencv2/usage.in
Normal file
4
ports/opencv2/usage.in
Normal 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)
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "opencv2",
|
||||
"version": "2.4.13.7",
|
||||
"port-version": 13,
|
||||
"port-version": 14,
|
||||
"description": "Open Source Computer Vision Library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "!uwp",
|
||||
"supports": "!uwp & !(arm & windows)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
@ -1,5 +1,3 @@
|
||||
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
|
||||
index 6dbeca9..08e2f4a 100644
|
||||
--- a/cmake/OpenCVFindLibsGrfmt.cmake
|
||||
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
|
||||
@@ -5,6 +5,9 @@
|
||||
|
11
ports/opencv3/0013-fix-ceres.patch
Normal file
11
ports/opencv3/0013-fix-ceres.patch
Normal 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,
|
15
ports/opencv3/0016-fix-freetype-contrib.patch
Normal file
15
ports/opencv3/0016-fix-freetype-contrib.patch
Normal 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)
|
@ -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)
|
||||
string(JSON OPENCV_VERSION GET "${_contents}" version)
|
||||
|
||||
@ -15,7 +7,7 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO opencv/opencv
|
||||
REF ${OPENCV_VERSION}
|
||||
SHA512 2fa9243625309a1c12c916737c94f0e2f9566f0828469b148cc1683dd1b8db8d1d58f90a36cfcaa72052964a718929451f04cda5361d8b546a63da69217d040a
|
||||
SHA512 96bbeb9525325f17ba635a0b75126aae0a7b0daef211af45057a97abd5d31a57fc50f0e889a6dab614df9b7621a145e06c0d240f0a218f33df1217d9a19c510d
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-disable-downloading.patch
|
||||
@ -54,6 +46,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
"eigen" WITH_EIGEN
|
||||
"ffmpeg" WITH_FFMPEG
|
||||
"flann" BUILD_opencv_flann
|
||||
"freetype" WITH_FREETYPE
|
||||
"gdcm" WITH_GDCM
|
||||
"gstreamer" WITH_GSTREAMER
|
||||
"halide" WITH_HALIDE
|
||||
@ -73,7 +66,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
"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)
|
||||
if("dnn" IN_LIST FEATURES)
|
||||
if(NOT VCPKG_TARGET_IS_ANDROID)
|
||||
@ -102,6 +95,15 @@ if("ipp" IN_LIST FEATURES)
|
||||
set(WITH_IPP ON)
|
||||
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)
|
||||
if("ovis" IN_LIST FEATURES)
|
||||
set(BUILD_opencv_ovis ON)
|
||||
@ -113,10 +115,16 @@ if("tbb" IN_LIST FEATURES)
|
||||
endif()
|
||||
|
||||
set(WITH_PYTHON OFF)
|
||||
set(BUILD_opencv_python3 OFF)
|
||||
if("python" IN_LIST FEATURES)
|
||||
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3")
|
||||
set(ENV{PYTHON} "${PYTHON3}")
|
||||
set(WITH_PYTHON ON)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static AND VCPKG_TARGET_IS_WINDOWS)
|
||||
message(WARNING "The python module is currently unsupported on Windows when building static OpenCV libraries")
|
||||
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()
|
||||
|
||||
if("dnn" IN_LIST FEATURES)
|
||||
@ -140,13 +148,15 @@ if("contrib" IN_LIST FEATURES)
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
|
||||
REPO opencv/opencv_contrib
|
||||
REF ${OPENCV_VERSION}
|
||||
SHA512 31bd55617d3a54fa020d4255e463c90caf41e10136c82a05c24ee19890f0cdc4fc049136874841dc84037dedb0562471ea0345ab1dcd5ad8a5b0218f24ae9a35
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0007-fix-hdf5.patch
|
||||
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
|
||||
REPO opencv/opencv_contrib
|
||||
REF ${OPENCV_VERSION}
|
||||
SHA512 a051497e61ae55f86c224044487fc2247a3bba1aa27031c4997c981ddf8402edf82f1dd0d307f562c638bc021cfd8bd42a723973f00ab25131495f84d33c5383
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
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")
|
||||
|
||||
@ -244,7 +254,7 @@ if(WITH_IPP)
|
||||
endif()
|
||||
|
||||
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)
|
||||
endif()
|
||||
|
||||
@ -267,6 +277,16 @@ if("ffmpeg" IN_LIST FEATURES)
|
||||
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)
|
||||
list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON")
|
||||
endif()
|
||||
@ -290,19 +310,20 @@ vcpkg_cmake_configure(
|
||||
-DX86=${TARGET_IS_X86}
|
||||
-DARM=${TARGET_IS_ARM}
|
||||
###### ocv_options
|
||||
-DINSTALL_TO_MANGLED_PATHS=OFF
|
||||
-DOpenCV_INSTALL_BINARIES_PREFIX=
|
||||
-DOPENCV_BIN_INSTALL_PATH=bin
|
||||
-DOPENCV_INCLUDE_INSTALL_PATH=include
|
||||
-DOPENCV_INCLUDE_INSTALL_PATH=include/opencv3
|
||||
-DOPENCV_LIB_INSTALL_PATH=lib
|
||||
-DOPENCV_3P_LIB_INSTALL_PATH=lib
|
||||
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv
|
||||
-DINSTALL_TO_MANGLED_PATHS=OFF
|
||||
-DOPENCV_3P_LIB_INSTALL_PATH=lib/manual-link/opencv3_thirdparty
|
||||
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv3
|
||||
-DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG
|
||||
-DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
-DOPENCV_DLLVERSION=
|
||||
-DOPENCV_DLLVERSION=3
|
||||
-DOPENCV_DEBUG_POSTFIX=d
|
||||
-DOPENCV_GENERATE_SETUPVARS=OFF
|
||||
-DOPENCV_GENERATE_PKGCONFIG=ON
|
||||
# Do not build docs/examples
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
@ -321,6 +342,8 @@ vcpkg_cmake_configure(
|
||||
-DBUILD_PROTOBUF=OFF
|
||||
###### OpenCV Build components
|
||||
-DBUILD_opencv_apps=OFF
|
||||
-DBUILD_opencv_java=OFF
|
||||
-DBUILD_opencv_js=OFF
|
||||
-DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm}
|
||||
-DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor}
|
||||
-DBUILD_opencv_saliency=${BUILD_opencv_saliency}
|
||||
@ -351,14 +374,12 @@ vcpkg_cmake_configure(
|
||||
###### customized properties
|
||||
## Options from vcpkg_check_features()
|
||||
${FEATURE_OPTIONS}
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON
|
||||
-DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR}
|
||||
-DWITH_GTK=${WITH_GTK}
|
||||
-DWITH_QT=${WITH_QT}
|
||||
-DWITH_IPP=${WITH_IPP}
|
||||
-DWITH_MATLAB=OFF
|
||||
-DWITH_MSMF=${WITH_MSMF}
|
||||
-DWITH_OPENMP=OFF
|
||||
-DWITH_OPENMP=${WITH_OPENMP}
|
||||
-DWITH_PROTOBUF=${BUILD_opencv_flann}
|
||||
-DWITH_PYTHON=${WITH_PYTHON}
|
||||
-DWITH_OPENCLAMDBLAS=OFF
|
||||
@ -368,6 +389,7 @@ vcpkg_cmake_configure(
|
||||
###### BUILD_options (mainly modules which require additional libraries)
|
||||
-DBUILD_opencv_ovis=${BUILD_opencv_ovis}
|
||||
-DBUILD_opencv_dnn=${BUILD_opencv_dnn}
|
||||
-DBUILD_opencv_python3=${BUILD_opencv_python3}
|
||||
###### The following modules are disabled for UWP
|
||||
-DBUILD_opencv_quality=${BUILD_opencv_quality}
|
||||
###### Additional build flags
|
||||
@ -375,19 +397,19 @@ vcpkg_cmake_configure(
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv")
|
||||
vcpkg_cmake_config_fixup()
|
||||
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)
|
||||
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}/debug/sdk"
|
||||
)
|
||||
endif()
|
||||
|
||||
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)
|
||||
if(${BUILD_opencv_flann})
|
||||
find_dependency(Protobuf CONFIG REQUIRED)
|
||||
@ -441,7 +463,7 @@ find_dependency(Tesseract)")
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(OpenMP)")
|
||||
endif()
|
||||
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()
|
||||
if("quirc" IN_LIST FEATURES)
|
||||
string(APPEND DEPS_STRING "\nfind_dependency(quirc)")
|
||||
@ -479,7 +501,7 @@ find_dependency(Qt${USE_QT_VERSION} COMPONENTS OpenGL)")
|
||||
"OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}")
|
||||
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")
|
||||
@ -489,6 +511,8 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/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)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android")
|
||||
@ -497,4 +521,6 @@ endif()
|
||||
|
||||
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)
|
||||
|
4
ports/opencv3/usage.in
Normal file
4
ports/opencv3/usage.in
Normal 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)
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "opencv3",
|
||||
"version": "3.4.16",
|
||||
"port-version": 9,
|
||||
"version": "3.4.18",
|
||||
"description": "Open Source Computer Vision Library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "BSD-3-Clause",
|
||||
@ -50,6 +49,7 @@
|
||||
"cudnn",
|
||||
{
|
||||
"name": "opencv3",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"contrib"
|
||||
]
|
||||
@ -125,6 +125,13 @@
|
||||
"protobuf"
|
||||
]
|
||||
},
|
||||
"freetype": {
|
||||
"description": "Freetype support for opencv",
|
||||
"dependencies": [
|
||||
"freetype",
|
||||
"harfbuzz"
|
||||
]
|
||||
},
|
||||
"gdcm": {
|
||||
"description": "GDCM support for opencv",
|
||||
"dependencies": [
|
||||
@ -196,12 +203,16 @@
|
||||
"opengl"
|
||||
]
|
||||
},
|
||||
"openmp": {
|
||||
"description": "Enable openmp support for opencv"
|
||||
},
|
||||
"ovis": {
|
||||
"description": "opencv_ovis module",
|
||||
"dependencies": [
|
||||
"ogre",
|
||||
{
|
||||
"name": "opencv3",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"contrib"
|
||||
]
|
||||
@ -215,7 +226,10 @@
|
||||
]
|
||||
},
|
||||
"python": {
|
||||
"description": "Python wrapper support for opencv"
|
||||
"description": "Python wrapper support for opencv",
|
||||
"dependencies": [
|
||||
"python3"
|
||||
]
|
||||
},
|
||||
"qt": {
|
||||
"description": "Qt GUI support for opencv",
|
||||
@ -236,14 +250,21 @@
|
||||
"description": "opencv_sfm module",
|
||||
"dependencies": [
|
||||
"ceres",
|
||||
"eigen3",
|
||||
"gflags",
|
||||
"glog",
|
||||
{
|
||||
"name": "opencv3",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"contrib"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "opencv3",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"eigen"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -262,6 +283,12 @@
|
||||
"vtk": {
|
||||
"description": "vtk support for opencv",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "opencv3",
|
||||
"features": [
|
||||
"contrib"
|
||||
]
|
||||
},
|
||||
"vtk"
|
||||
]
|
||||
},
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
--- 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 opencv_dnn WRAP java objc python js)
|
||||
@@ -2,7 +2,5 @@ js
|
||||
)
|
||||
|
||||
if(HAVE_QUIRC)
|
||||
- get_property(QUIRC_INCLUDE GLOBAL PROPERTY QUIRC_INCLUDE_DIR)
|
||||
|
@ -1,5 +1,3 @@
|
||||
diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake
|
||||
index 8ea5497..7ed3f6b 100644
|
||||
--- a/cmake/OpenCVFindLibsGrfmt.cmake
|
||||
+++ b/cmake/OpenCVFindLibsGrfmt.cmake
|
||||
@@ -5,6 +5,9 @@
|
||||
|
11
ports/opencv4/0013-fix-ceres.patch
Normal file
11
ports/opencv4/0013-fix-ceres.patch
Normal 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,
|
@ -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()
|
||||
|
@ -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})
|
12
ports/opencv4/0014-fix-ogre.patch
Normal file
12
ports/opencv4/0014-fix-ogre.patch
Normal 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);
|
@ -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
|
||||
+++ b/modules/gapi/cmake/init.cmake
|
||||
@@ -20,10 +20,8 @@ if(NOT TARGET ade)
|
||||
|
@ -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
|
||||
+++ b/modules/freetype/CMakeLists.txt
|
||||
@@ -3,8 +5,10 @@ if(APPLE_FRAMEWORK)
|
||||
|
15
ports/opencv4/0017-mingw-strsafe-no-deprecate.patch
Normal file
15
ports/opencv4/0017-mingw-strsafe-no-deprecate.patch
Normal 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
|
||||
|
@ -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)
|
||||
string(JSON OPENCV_VERSION GET "${_contents}" version)
|
||||
|
||||
@ -15,24 +7,23 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO opencv/opencv
|
||||
REF ${OPENCV_VERSION}
|
||||
SHA512 4d1783fd78425cc43bb2153446dd634cedd366a49592bccc0c538a40aa161fcf67db8f1b6b68f1ce0b4a93504b3f06f65931709277afb1a1ee9fe963094bca02
|
||||
SHA512 93d7807794682990b6a1d1de1851986ae3c5d1afe6605f3f8cace03ba5e3390bee2568bc0f335af34d3fc974df64cbce0ce685261ec2abd693d259b97b15bc46
|
||||
FILE_DISAMBIGUATOR 1
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0001-disable-downloading.patch
|
||||
0002-install-options.patch
|
||||
0003-force-package-requirements.patch
|
||||
0004-fix-policy-CMP0057.patch
|
||||
0005-fix-eigen.patch
|
||||
0004-fix-eigen.patch
|
||||
0005-fix-policy-CMP0057.patch
|
||||
0006-fix-uwp.patch
|
||||
0008-devendor-quirc.patch
|
||||
0009-fix-protobuf.patch
|
||||
0010-fix-uwp-tiff-imgcodecs.patch
|
||||
0011-remove-python2.patch
|
||||
0012-fix-zlib.patch
|
||||
0013-fix-opengl.patch
|
||||
0014-fix-gstreamer.patch
|
||||
0015-fix-freetype.patch
|
||||
0017-mingw-strsafe-no-deprecate.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
@ -80,7 +71,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
"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)
|
||||
if("dnn" IN_LIST FEATURES)
|
||||
if(NOT VCPKG_TARGET_IS_ANDROID)
|
||||
@ -179,10 +170,12 @@ if("contrib" IN_LIST FEATURES)
|
||||
OUT_SOURCE_PATH CONTRIB_SOURCE_PATH
|
||||
REPO opencv/opencv_contrib
|
||||
REF ${OPENCV_VERSION}
|
||||
SHA512 8469de524e8e6f4c50a74b8cbec5e4cfc48a63a6dfc787609696099eca40dc02b9dc7a347a014d4416fd4efd66955d3af5f4847f44612312a8362f453e6c2e35
|
||||
SHA512 2e9cc9632774babf59cd186cd7b7edbd35a816bdda2acb51339c514a33fc6d8c3f1687eb3b0f6827304e3fcb0f9f3e81d47e8ab08239175750ac1240cc99dc5d
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
0007-fix-hdf5.patch
|
||||
0013-fix-ceres.patch
|
||||
0014-fix-ogre.patch
|
||||
0016-fix-freetype-contrib.patch
|
||||
)
|
||||
set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules")
|
||||
@ -322,7 +315,7 @@ if(WITH_IPP)
|
||||
endif()
|
||||
|
||||
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)
|
||||
endif()
|
||||
|
||||
@ -369,17 +362,17 @@ vcpkg_cmake_configure(
|
||||
-DX86=${TARGET_IS_X86}
|
||||
-DARM=${TARGET_IS_ARM}
|
||||
###### ocv_options
|
||||
-DINSTALL_TO_MANGLED_PATHS=OFF
|
||||
-DOpenCV_INSTALL_BINARIES_PREFIX=
|
||||
-DOPENCV_BIN_INSTALL_PATH=bin
|
||||
-DOPENCV_INCLUDE_INSTALL_PATH=include
|
||||
-DOPENCV_LIB_INSTALL_PATH=lib
|
||||
-DOPENCV_3P_LIB_INSTALL_PATH=lib
|
||||
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv
|
||||
-DINSTALL_TO_MANGLED_PATHS=OFF
|
||||
-DOPENCV_3P_LIB_INSTALL_PATH=lib/manual-link/opencv4_thirdparty
|
||||
-DOPENCV_CONFIG_INSTALL_PATH=share/opencv4
|
||||
-DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG
|
||||
-DOPENCV_FFMPEG_SKIP_BUILD_CHECK=TRUE
|
||||
-DCMAKE_DEBUG_POSTFIX=d
|
||||
-DOPENCV_DLLVERSION=
|
||||
-DOPENCV_DLLVERSION=4
|
||||
-DOPENCV_DEBUG_POSTFIX=d
|
||||
-DOPENCV_GENERATE_SETUPVARS=OFF
|
||||
-DOPENCV_GENERATE_PKGCONFIG=ON
|
||||
@ -436,9 +429,9 @@ vcpkg_cmake_configure(
|
||||
-DWITH_IPP=${WITH_IPP}
|
||||
-DWITH_MATLAB=OFF
|
||||
-DWITH_MSMF=${WITH_MSMF}
|
||||
-DWITH_PYTHON=${WITH_PYTHON}
|
||||
-DWITH_OPENMP=${WITH_OPENMP}
|
||||
-DWITH_PROTOBUF=${BUILD_opencv_dnn}
|
||||
-DWITH_PYTHON=${WITH_PYTHON}
|
||||
-DWITH_OPENCLAMDBLAS=OFF
|
||||
-DWITH_TBB=${WITH_TBB}
|
||||
-DWITH_OPENJPEG=OFF
|
||||
@ -457,19 +450,19 @@ vcpkg_cmake_configure(
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv")
|
||||
vcpkg_cmake_config_fixup()
|
||||
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)
|
||||
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}/debug/sdk"
|
||||
)
|
||||
endif()
|
||||
|
||||
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)
|
||||
if(${BUILD_opencv_dnn})
|
||||
find_dependency(Protobuf CONFIG REQUIRED)
|
||||
@ -561,7 +554,7 @@ find_dependency(Qt${USE_QT_VERSION} COMPONENTS OpenGL)")
|
||||
"OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}")
|
||||
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")
|
||||
@ -571,6 +564,8 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/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)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android")
|
||||
@ -579,4 +574,6 @@ endif()
|
||||
|
||||
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)
|
||||
|
5
ports/opencv4/usage.in
Normal file
5
ports/opencv4/usage.in
Normal 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)
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "opencv4",
|
||||
"version": "4.5.5",
|
||||
"port-version": 7,
|
||||
"version": "4.6.0",
|
||||
"description": "computer vision library",
|
||||
"homepage": "https://github.com/opencv/opencv",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -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
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -106,6 +106,7 @@ if(MSVC)
|
||||
@ -19,6 +8,3 @@ index 5cdae617..ed829a46 100644
|
||||
endif()
|
||||
|
||||
# [Eclipse] Automatic Discovery of Include directories (Optional, but handy)
|
||||
--
|
||||
2.35.1.windows.2
|
||||
|
||||
|
11
ports/rtabmap/0002-fix-opencv46.patch
Normal file
11
ports/rtabmap/0002-fix-opencv46.patch
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -966,13 +966,13 @@ IF(ANDROID)
|
||||
@ -26,6 +16,3 @@ index 5cdae617..fe98199b 100644
|
||||
ENDIF()
|
||||
|
||||
IF(BUILD_TOOLS)
|
||||
--
|
||||
2.32.0.windows.1
|
||||
|
@ -7,8 +7,9 @@ vcpkg_from_github(
|
||||
SHA512 7787d5f927f53554cec3044221011cbc78b654c504d96af29947266e25058194923c5463aefde73b93dcfb3930eedf731f6af4d0c311d8f2f0d7be2114393e05
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-qt.patch
|
||||
0001-add-bigobj-for-msvc.patch
|
||||
0002-fix-opencv46.patch
|
||||
0003-fix-qt.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
@ -90,7 +91,7 @@ if("tools" IN_LIST FEATURES)
|
||||
)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
)
|
||||
|
@ -1,12 +1,16 @@
|
||||
{
|
||||
"name": "rtabmap",
|
||||
"version": "0.20.13",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "Real-Time Appearance-Based Mapping",
|
||||
"homepage": "https://introlab.github.io/rtabmap/",
|
||||
"license": "BSD-3-Clause",
|
||||
"supports": "windows & !static",
|
||||
"dependencies": [
|
||||
"opencv",
|
||||
{
|
||||
"name": "opencv",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "pcl",
|
||||
"default-features": false,
|
||||
@ -24,7 +28,22 @@
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
"opencv-contrib"
|
||||
],
|
||||
"features": {
|
||||
"opencv-contrib": {
|
||||
"description": "Use OpenCV with contrib modules",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "opencv",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"contrib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tools": {
|
||||
"description": "Build tools",
|
||||
"dependencies": [
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "vcpkg-get-python-packages",
|
||||
"version-date": "2022-04-11",
|
||||
"port-version": 1,
|
||||
"version-date": "2022-06-30",
|
||||
"documentation": "https://vcpkg.io/en/docs/README.html",
|
||||
"license": "MIT",
|
||||
"supports": "native"
|
||||
|
@ -31,21 +31,32 @@ function(x_vcpkg_get_python_packages)
|
||||
|
||||
get_filename_component(python_dir "${arg_PYTHON_EXECUTABLE}" DIRECTORY)
|
||||
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")
|
||||
# file(COPY "${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-get-python-packages/python310._pth" DESTINATION "${python_dir}")
|
||||
#endif()
|
||||
if(NOT EXISTS "${python_dir}/easy_install${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
if(NOT EXISTS "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
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}"
|
||||
LOGNAME "get-pip-${TARGET_TRIPLET}")
|
||||
if(arg_PYTHON_VERSION STREQUAL 3)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH PYFILE_PATH
|
||||
REPO pypa/get-pip
|
||||
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}"
|
||||
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()
|
||||
vcpkg_execute_required_process(COMMAND "${python_dir}/Scripts/pip${VCPKG_HOST_EXECUTABLE_SUFFIX}" install virtualenv --no-warn-script-location
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
@ -58,23 +69,29 @@ function(x_vcpkg_get_python_packages)
|
||||
endif()
|
||||
set(venv_path "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-venv")
|
||||
file(REMOVE_RECURSE "${venv_path}") # Remove old venv
|
||||
file(MAKE_DIRECTORY "${venv_path}")
|
||||
file(MAKE_DIRECTORY "${venv_path}")
|
||||
if(CMAKE_HOST_WIN32)
|
||||
file(MAKE_DIRECTORY "${python_dir}/DLLs")
|
||||
file(MAKE_DIRECTORY "${python_dir}/DLLs")
|
||||
set(python_sub_path /Scripts)
|
||||
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")
|
||||
else()
|
||||
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)
|
||||
endif()
|
||||
|
||||
set(ENV{PYTHONNOUSERSITE} "1")
|
||||
message(STATUS "Setting up python virtual environmnent...")
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -m "${python_venv}" ${python_venv_options} "${venv_path}"
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
vcpkg_execute_required_process(COMMAND "${arg_PYTHON_EXECUTABLE}" -m "${python_venv}" ${python_venv_options} "${venv_path}"
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "venv-setup-${TARGET_TRIPLET}")
|
||||
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}")
|
||||
@ -83,14 +100,14 @@ function(x_vcpkg_get_python_packages)
|
||||
unset(ENV{PYTHONPATH})
|
||||
if(DEFINED 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}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install -r ${arg_REQUIREMENTS_FILE}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-requirements-file-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
if(DEFINED arg_PACKAGES)
|
||||
message(STATUS "Installing python packages: ${arg_PACKAGES}")
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install ${arg_PACKAGES}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
vcpkg_execute_required_process(COMMAND "${${arg_OUT_PYTHON_VAR}}" -m pip install ${arg_PACKAGES}
|
||||
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
|
||||
LOGNAME "pip-install-packages-${TARGET_TRIPLET}")
|
||||
endif()
|
||||
message(STATUS "Setting up python virtual environmnent...finished.")
|
||||
|
@ -770,24 +770,24 @@ opencl:arm-uwp=fail
|
||||
opencl:x64-uwp=fail
|
||||
opencsg:arm-uwp=fail
|
||||
opencsg:x64-uwp=fail
|
||||
opencv2:arm64-windows = skip
|
||||
opencv2:arm-uwp = skip
|
||||
opencv2:x64-linux = skip
|
||||
opencv2:x64-osx = skip
|
||||
opencv2:x64-uwp = skip
|
||||
opencv2:x64-windows = skip
|
||||
opencv2:x64-windows-static = skip
|
||||
opencv2:x64-windows-static-md=skip
|
||||
opencv2:x86-windows = skip
|
||||
opencv3:arm64-windows = skip
|
||||
opencv3:arm-uwp = skip
|
||||
opencv3:x64-linux = skip
|
||||
opencv3:x64-osx = skip
|
||||
opencv3:x64-uwp = skip
|
||||
opencv3:x64-windows = skip
|
||||
opencv3:x64-windows-static = skip
|
||||
opencv3:x64-windows-static-md=skip
|
||||
opencv3:x86-windows = skip
|
||||
opencv2:arm64-windows = skip
|
||||
opencv2:arm-uwp = skip
|
||||
opencv2:x64-linux = skip
|
||||
opencv2:x64-osx = skip
|
||||
opencv2:x64-uwp = skip
|
||||
opencv2:x64-windows = skip
|
||||
opencv2:x64-windows-static = skip
|
||||
opencv2:x64-windows-static-md = skip
|
||||
opencv2:x86-windows = skip
|
||||
opencv3:arm64-windows = skip
|
||||
opencv3:arm-uwp = skip
|
||||
opencv3:x64-linux = skip
|
||||
opencv3:x64-osx = skip
|
||||
opencv3:x64-uwp = skip
|
||||
opencv3:x64-windows = skip
|
||||
opencv3:x64-windows-static = skip
|
||||
opencv3:x64-windows-static-md = skip
|
||||
opencv3:x86-windows = skip
|
||||
opendnp3:x64-uwp=fail
|
||||
opendnp3:arm-uwp=fail
|
||||
openexr:arm64-windows=fail
|
||||
|
@ -1310,7 +1310,7 @@
|
||||
},
|
||||
"cctag": {
|
||||
"baseline": "1.0.2",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"cctz": {
|
||||
"baseline": "2.3",
|
||||
@ -1854,7 +1854,7 @@
|
||||
},
|
||||
"dbow3": {
|
||||
"baseline": "1.0.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"dcmtk": {
|
||||
"baseline": "3.6.7",
|
||||
@ -5189,20 +5189,20 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"opencv": {
|
||||
"baseline": "4.5.5",
|
||||
"port-version": 1
|
||||
"baseline": "4.6.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"opencv2": {
|
||||
"baseline": "2.4.13.7",
|
||||
"port-version": 13
|
||||
"port-version": 14
|
||||
},
|
||||
"opencv3": {
|
||||
"baseline": "3.4.16",
|
||||
"port-version": 9
|
||||
"baseline": "3.4.18",
|
||||
"port-version": 0
|
||||
},
|
||||
"opencv4": {
|
||||
"baseline": "4.5.5",
|
||||
"port-version": 7
|
||||
"baseline": "4.6.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"opendnp3": {
|
||||
"baseline": "3.1.1",
|
||||
@ -6374,7 +6374,7 @@
|
||||
},
|
||||
"rtabmap": {
|
||||
"baseline": "0.20.13",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"rtaudio": {
|
||||
"baseline": "2021-11-16",
|
||||
@ -7449,8 +7449,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"vcpkg-get-python-packages": {
|
||||
"baseline": "2022-04-11",
|
||||
"port-version": 1
|
||||
"baseline": "2022-06-30",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-gfortran": {
|
||||
"baseline": "3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "979f28c0cc646b1a4c057ee810772a6b8964b65a",
|
||||
"version-semver": "1.0.2",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "41cef2a0749658a793585a55c57cb701e0845427",
|
||||
"version-semver": "1.0.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0942151a7555bcac51e84d94474111ca96ff5974",
|
||||
"version": "1.0.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "d0cbeaf64e4827fa69b0c07f21c6d0d689305559",
|
||||
"version-string": "1.0.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "135db832c720c800e2ac222994aa216df7575d17",
|
||||
"version": "4.6.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "1ed18903421ae513e731348b2e5afb13c8c38d24",
|
||||
"version": "4.5.5",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "5161f9b494cb04f39503980cdca10bdac6e7ee53",
|
||||
"version": "2.4.13.7",
|
||||
"port-version": 14
|
||||
},
|
||||
{
|
||||
"git-tree": "5dad4c606f120b7d208ec193036596bd82074e81",
|
||||
"version": "2.4.13.7",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "15c9083efa4c00674bef4fbca443a662fe6dd5cd",
|
||||
"version": "3.4.18",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "8d02d89d9531e2243b81f37f97a9be943fd6b0a0",
|
||||
"version": "3.4.16",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1ff543272c91a32d242ad5320e9ca63b29b34ed2",
|
||||
"version": "4.6.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "8e165720af85f0da853cf0a4ac9eb5cb20804d13",
|
||||
"version": "4.5.5",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b51506f789882022d1af0556521079694ce5cf62",
|
||||
"version": "0.20.13",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "cf41f524585ec0c2dd5b8c7d8b455a79265b62ea",
|
||||
"version": "0.20.13",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e65762bfef05a4d380bb171409c48a694fb35435",
|
||||
"version-date": "2022-06-30",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "ffe13ab59e3e2f4f003498035bc1fbc06b64e164",
|
||||
"version-date": "2022-04-11",
|
||||
|
Loading…
Reference in New Issue
Block a user