diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2021-08-13 23:46:11 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-13 08:46:11 -0700 |
| commit | eb9cb291669f24b315d6001065e3b1e53e3701b4 (patch) | |
| tree | ac6ddb54ffe3799920c8f70b7bcbd01802775136 /ports/opencv3 | |
| parent | 7bdf2f8e853a476f96f3d1ba3be409b65822a29d (diff) | |
| download | vcpkg-eb9cb291669f24b315d6001065e3b1e53e3701b4.tar.gz vcpkg-eb9cb291669f24b315d6001065e3b1e53e3701b4.zip | |
[ffmpeg/opencv4] Update opencv4 feature dependency and remove ffmpeg feature 'postproc' from default feature (#19358)
* [ffmpeg/opencv4] Update opencv4 feature dependency and remove ffmpeg feature 'postproc' from default feature
* Update the baseline version
* [opencv3] Update the feature dependency
* Update the baseline
* [opencv2] Update the feature dependency
* Update the baseline version
* Fix uwp build failures
* Update the baseline version
* Fix opencv2 version
* update the baseline version
* update the baseline version
* Un-edit git-tree.
* Update cuda feature
* Update the baseline
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'ports/opencv3')
| -rw-r--r-- | ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch | 15 | ||||
| -rw-r--r-- | ports/opencv3/portfile.cmake | 30 | ||||
| -rw-r--r-- | ports/opencv3/vcpkg.json | 21 |
3 files changed, 49 insertions, 17 deletions
diff --git a/ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch b/ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch new file mode 100644 index 000000000..02fbaedd5 --- /dev/null +++ b/ports/opencv3/0010-fix-uwp-tiff-imgcodecs.patch @@ -0,0 +1,15 @@ +diff --git a/modules/imgcodecs/CMakeLists.txt b/modules/imgcodecs/CMakeLists.txt +index 24f89e6..435deb6 100644 +--- a/modules/imgcodecs/CMakeLists.txt ++++ b/modules/imgcodecs/CMakeLists.txt +@@ -9,6 +9,10 @@ ocv_add_module(imgcodecs opencv_imgproc WRAP java objc python) + + ocv_clear_vars(GRFMT_LIBS) + ++if(MSVC) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996") ++endif() ++ + if(HAVE_WINRT_CX AND NOT WINRT) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") + endif() diff --git a/ports/opencv3/portfile.cmake b/ports/opencv3/portfile.cmake index 5e298acbc..741570731 100644 --- a/ports/opencv3/portfile.cmake +++ b/ports/opencv3/portfile.cmake @@ -22,6 +22,7 @@ vcpkg_from_github( 0005-fix-vtk9.patch 0006-fix-uwp.patch 0008-devendor-quirc.patch + 0010-fix-uwp-tiff-imgcodecs.patch ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") @@ -252,9 +253,8 @@ if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") set(BUILD_opencv_bgsegm OFF) endif() -vcpkg_configure_cmake( - PREFER_NINJA - SOURCE_PATH ${SOURCE_PATH} +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS ###### opencv cpu recognition is broken, always using host and not target: here we bypass that -DOPENCV_SKIP_SYSTEM_PROCESSOR_DETECTION=TRUE @@ -344,12 +344,12 @@ vcpkg_configure_cmake( ${ADDITIONAL_BUILD_FLAGS} ) -vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "share/opencv" TARGET_PATH "share/opencv") +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME opencv CONFIG_PATH "share/opencv") 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/opencv/OpenCVModules.cmake" OPENCV_MODULES) set(DEPS_STRING "include(CMakeFindDependencyMacro) find_dependency(protobuf CONFIG) if(protobuf_FOUND) @@ -437,20 +437,20 @@ find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)") "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") endif() - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/opencv/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() -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}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") if(VCPKG_TARGET_IS_ANDROID) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/README.android) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/README.android) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.android") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/README.android") endif() -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) diff --git a/ports/opencv3/vcpkg.json b/ports/opencv3/vcpkg.json index 50d927750..5bf690492 100644 --- a/ports/opencv3/vcpkg.json +++ b/ports/opencv3/vcpkg.json @@ -1,10 +1,18 @@ { "name": "opencv3", "version": "3.4.14", - "port-version": 1, + "port-version": 2, "description": "computer vision library", "homepage": "https://github.com/opencv/opencv", "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, "zlib" ], "default-features": [ @@ -68,7 +76,16 @@ "ffmpeg": { "description": "ffmpeg support for opencv", "dependencies": [ - "ffmpeg" + { + "name": "ffmpeg", + "default-features": false, + "features": [ + "avcodec", + "avformat", + "swresample", + "swscale" + ] + } ] }, "flann": { |
