Initial release

This commit is contained in:
Louis Rossmann
2026-05-11 07:39:33 -05:00
commit c661ddc2eb
16967 changed files with 4075897 additions and 0 deletions

54
deps/OpenCV/0001-vs.patch vendored Normal file
View File

@@ -0,0 +1,54 @@
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)

54
deps/OpenCV/0002-clang19-macos.patch vendored Normal file
View File

@@ -0,0 +1,54 @@
From 893b8113f04d408cc6177c6de19c9889a48faa24 Mon Sep 17 00:00:00 2001
From: Zixu Wang <zixu_wang@apple.com>
Date: Thu, 18 Jan 2024 11:12:00 -0800
Subject: [PATCH] Fix unused platform check and configuration for macOS
In a similar manner as zlib (https://github.com/madler/zlib/pull/895),
libpng contains a header configuration that's no longer valid and
hasn't been exercised for the macOS target.
- The target OS conditional macros are misused. Specifically
`TARGET_OS_MAC` covers all Apple targets, including iOS, and it
should not be checked with `#if defined` as they would always be
defined (to either 1 or 0) on Apple platforms.
- `#include <fp.h>` no longer works for the macOS target and results
in a compilation failure. macOS ships all required functions in
`math.h`, and clients should use `math.h` instead.
This problem has not been noticed until a recent extension in clang
(https://github.com/llvm/llvm-project/pull/74676) exposed the issue
and broke libpng builds on Apple platforms. The failure can be
reproduced now by adding `#include <TargetConditionals.h>` before the
block.
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
---
AUTHORS | 2 ++
pngpriv.h | 14 ++------------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/3rdparty/libpng/pngpriv.h b/3rdparty/libpng/pngpriv.h
index 6c7280cf53..190eb85cbf 100644
--- a/3rdparty/libpng/pngpriv.h
+++ b/3rdparty/libpng/pngpriv.h
@@ -556,18 +556,8 @@
*/
# include <float.h>
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
- /* We need to check that <math.h> hasn't already been included earlier
- * as it seems it doesn't agree with <fp.h>, yet we should really use
- * <fp.h> if possible.
- */
-# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
-# include <fp.h>
-# endif
-# else
-# include <math.h>
-# endif
+# include <math.h>
+
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881

78
deps/OpenCV/OpenCV.cmake vendored Normal file
View File

@@ -0,0 +1,78 @@
if (MSVC)
set(_use_IPP "-DWITH_IPP=ON")
else ()
set(_use_IPP "-DWITH_IPP=OFF")
endif ()
if (IN_GIT_REPO)
set(OpenCV_DIRECTORY_FLAG --directory ${BINARY_DIR_REL}/dep_OpenCV-prefix/src/dep_OpenCV)
endif ()
orcaslicer_add_cmake_project(OpenCV
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 ${CMAKE_CURRENT_LIST_DIR}/0002-clang19-macos.patch
CMAKE_ARGS
-DBUILD_SHARED_LIBS=0
-DBUILD_PERE_TESTS=OFF
-DBUILD_TESTS=OFF
-DBUILD_opencv_python_tests=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_JASPER=OFF
-DBUILD_JAVA=OFF
-DBUILD_JPEG=ON
-DBUILD_APPS_LIST=version
-DBUILD_opencv_apps=OFF
-DBUILD_opencv_java=OFF
-DBUILD_OPENEXR=OFF
-DBUILD_PNG=ON
-DBUILD_TBB=OFF
-DBUILD_WEBP=OFF
-DBUILD_ZLIB=OFF
-DWITH_1394=OFF
-DWITH_CUDA=OFF
-DWITH_EIGEN=OFF
${_use_IPP}
-DWITH_ITT=OFF
-DWITH_FFMPEG=OFF
-DWITH_GPHOTO2=OFF
-DWITH_GSTREAMER=OFF
-DOPENCV_GAPI_GSTREAMER=OFF
-DWITH_GTK_2_X=OFF
-DWITH_JASPER=OFF
-DWITH_LAPACK=OFF
-DWITH_MATLAB=OFF
-DWITH_MFX=OFF
-DWITH_DIRECTX=OFF
-DWITH_DIRECTML=OFF
-DWITH_OPENCL=OFF
-DWITH_OPENCL_D3D11_NV=OFF
-DWITH_OPENCLAMDBLAS=OFF
-DWITH_OPENCLAMDFFT=OFF
-DWITH_OPENEXR=OFF
-DWITH_OPENJPEG=OFF
-DWITH_QUIRC=OFF
-DWITH_VTK=OFF
-DWITH_JPEG=OFF
-DWITH_WEBP=OFF
-DENABLE_PRECOMPILED_HEADERS=OFF
-DINSTALL_TESTS=OFF
-DINSTALL_C_EXAMPLES=OFF
-DINSTALL_PYTHON_EXAMPLES=OFF
-DOPENCV_GENERATE_SETUPVARS=OFF
-DOPENCV_INSTALL_FFMPEG_DOWNLOAD_SCRIPT=OFF
-DBUILD_opencv_python2=OFF
-DBUILD_opencv_python3=OFF
-DWITH_OPENVINO=OFF
-DWITH_INF_ENGINE=OFF
-DWITH_NGRAPH=OFF
-DBUILD_WITH_STATIC_CRT=OFF#set /MDd /MD
-DBUILD_LIST=core,imgcodecs,imgproc,world
-DBUILD_opencv_highgui=OFF
-DWITH_ADE=OFF
-DBUILD_opencv_world=ON
-DWITH_PROTOBUF=OFF
-DWITH_WIN32UI=OFF
-DHAVE_WIN32UI=FALSE
)