mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-22 21:50:51 -05:00
Update OpenCV to 4.14.0 (#16851)
Update OpenCV from 4.6.0 to 4.14.0. - Drop 0001-vs.patch. 4.14.0 already detects the VS 2022 and VS 2026 runtimes, so OpenCV now builds with no patches. - Turn off three options that 4.14.0 enables by default: AVIF (it would link a system libavif), the new GIF decoder, and KleidiCV (downloaded at configure time on aarch64). - Build OpenCV with -fno-delayed-template-parsing under clang-cl, so softfloat.cpp compiles for Windows ARM64. - Point the Flatpak manifest at the 4.14.0 tarball. Behavior change: the PNG reader rejects a few malformed files that 4.6 loaded.
This commit is contained in:
1 parent
4804b54cd1
commit
1008a47870
3 files changed
+16
-62
No files matched your search
Vendored
-54
@@ -1,54 +0,0 @@
|
||||
diff --git a/cmake/OpenCVDetectCXXCompiler.cmake b/cmake/OpenCVDetectCXXCompiler.cmake
|
||||
index 7f229cde96..d8e20f8fe9 100644
|
||||
--- a/cmake/OpenCVDetectCXXCompiler.cmake
|
||||
+++ b/cmake/OpenCVDetectCXXCompiler.cmake
|
||||
@@ -171,8 +171,10 @@ elseif(MSVC)
|
||||
set(OpenCV_RUNTIME vc15)
|
||||
elseif(MSVC_VERSION MATCHES "^192[0-9]$")
|
||||
set(OpenCV_RUNTIME vc16)
|
||||
- elseif(MSVC_VERSION MATCHES "^193[0-9]$")
|
||||
+ elseif(MSVC_VERSION MATCHES "^19[34][0-9]$")
|
||||
set(OpenCV_RUNTIME vc17)
|
||||
+ elseif(MSVC_VERSION MATCHES "^195[0-9]$")
|
||||
+ set(OpenCV_RUNTIME vc18)
|
||||
else()
|
||||
message(WARNING "OpenCV does not recognize MSVC_VERSION \"${MSVC_VERSION}\". Cannot set OpenCV_RUNTIME")
|
||||
endif()
|
||||
diff --git a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
|
||||
index b0f254ebe8..8f0178b0ae 100644
|
||||
--- a/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
|
||||
+++ b/cmake/templates/OpenCVConfig.root-WIN32.cmake.in
|
||||
@@ -137,7 +137,7 @@ elseif(MSVC)
|
||||
set(OpenCV_RUNTIME vc14) # selecting previous compatible runtime version
|
||||
endif()
|
||||
endif()
|
||||
- elseif(MSVC_VERSION MATCHES "^193[0-9]$")
|
||||
+ elseif(MSVC_VERSION MATCHES "^19[34][0-9]$")
|
||||
set(OpenCV_RUNTIME vc17)
|
||||
check_one_config(has_VS2022)
|
||||
if(NOT has_VS2022)
|
||||
@@ -151,6 +151,24 @@ elseif(MSVC)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
+ elseif(MSVC_VERSION MATCHES "^195[0-9]$")
|
||||
+ set(OpenCV_RUNTIME vc18)
|
||||
+ check_one_config(has_VS2026)
|
||||
+ if(NOT has_VS2026)
|
||||
+ set(OpenCV_RUNTIME vc17)
|
||||
+ check_one_config(has_VS2022)
|
||||
+ if(NOT has_VS2022)
|
||||
+ set(OpenCV_RUNTIME vc16)
|
||||
+ check_one_config(has_VS2019)
|
||||
+ if(NOT has_VS2019)
|
||||
+ set(OpenCV_RUNTIME vc15) # selecting previous compatible runtime version
|
||||
+ check_one_config(has_VS2017)
|
||||
+ if(NOT has_VS2017)
|
||||
+ set(OpenCV_RUNTIME vc14) # selecting previous compatible runtime version
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ endif()
|
||||
+ endif()
|
||||
endif()
|
||||
elseif(MINGW)
|
||||
set(OpenCV_RUNTIME mingw)
|
||||
Vendored
+13
-5
@@ -17,15 +17,17 @@ if ("${DEPS_ARCH}" STREQUAL "arm64" AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(_disable_carotene "-DWITH_CAROTENE=OFF")
|
||||
endif ()
|
||||
|
||||
if (IN_GIT_REPO)
|
||||
set(OpenCV_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_OpenCV-prefix/src/dep_OpenCV)
|
||||
# clang-cl parses template bodies at the end of each file. In softfloat.cpp that
|
||||
# is after OpenCV's own float32_t, which then hides the NEON one in arm_neon.h.
|
||||
set(_clang_cl_flags "")
|
||||
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||
set(_clang_cl_flags "-DOPENCV_EXTRA_CXX_FLAGS=-fno-delayed-template-parsing")
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(OpenCV
|
||||
${_options}
|
||||
URL https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
|
||||
URL_HASH SHA256=1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
|
||||
PATCH_COMMAND git apply ${OpenCV_DIRECTORY_FLAG} --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-vs.patch
|
||||
URL https://github.com/opencv/opencv/archive/refs/tags/4.14.0.tar.gz
|
||||
URL_HASH SHA256=ee8fb9b30eb60850431b4656447080e3737b56e45719c92b67f245950609f86e
|
||||
DEPENDS ${JPEG_PKG} ${PNG_PKG}
|
||||
CMAKE_ARGS
|
||||
-DBUILD_SHARED_LIBS=0
|
||||
@@ -74,6 +76,11 @@ orcaslicer_add_cmake_project(OpenCV
|
||||
-DWITH_WEBP=OFF
|
||||
-DWITH_TIFF=OFF
|
||||
-DBUILD_TIFF=OFF
|
||||
# Codecs and HALs added after 4.6 that default to ON. AVIF would link any
|
||||
# system libavif it finds, and KleidiCV is downloaded at configure time.
|
||||
-DWITH_AVIF=OFF
|
||||
-DWITH_IMGCODEC_GIF=OFF
|
||||
-DWITH_KLEIDICV=OFF
|
||||
-DENABLE_PRECOMPILED_HEADERS=OFF
|
||||
-DINSTALL_TESTS=OFF
|
||||
-DINSTALL_C_EXAMPLES=OFF
|
||||
@@ -94,5 +101,6 @@ orcaslicer_add_cmake_project(OpenCV
|
||||
-DWITH_WIN32UI=OFF
|
||||
-DHAVE_WIN32UI=FALSE
|
||||
${_disable_carotene}
|
||||
${_clang_cl_flags}
|
||||
)
|
||||
|
||||
@@ -286,10 +286,10 @@ modules:
|
||||
sha256: 7c033d917ee8f040c0512d289dcc5f02c148889d5bac17c3e25639accb44f0da
|
||||
dest: external-packages/OCCT
|
||||
|
||||
# OpenCV 4.6.0
|
||||
# OpenCV 4.14.0
|
||||
- type: file
|
||||
url: https://github.com/opencv/opencv/archive/refs/tags/4.6.0.tar.gz
|
||||
sha256: 1ec1cba65f9f20fe5a41fda1586e01c70ea0c9a6d7b67c9e13edf0cfe2239277
|
||||
url: https://github.com/opencv/opencv/archive/refs/tags/4.14.0.tar.gz
|
||||
sha256: ee8fb9b30eb60850431b4656447080e3737b56e45719c92b67f245950609f86e
|
||||
dest: external-packages/OpenCV
|
||||
|
||||
# CPython 3.12.13
|
||||
|
||||
Reference in new issue
Block a user