File orca-slicer-unbundle-opencv.patch of Package orca-slicer

From d7fbffc157238c7b3cc8318e36dc7302d87f02e0 Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Thu, 12 Dec 2024 01:56:19 +0000
Subject: [PATCH] Use unbundled OpenCV.

Add ${OpenCV_INCLUDE_DIRS} to include path of libslic3r.
Use opencv_core library.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 src/libslic3r/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
index c15cb6335..39f0c50b3 100644
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -514,6 +514,7 @@ encoding_check(libslic3r)
 
 target_compile_definitions(libslic3r PUBLIC -DUSE_TBB -DTBB_USE_CAPTURED_EXCEPTION=0)
 target_include_directories(libslic3r PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
+target_include_directories(libslic3r PUBLIC ${OpenCV_INCLUDE_DIRS})
 target_include_directories(libslic3r PUBLIC ${EXPAT_INCLUDE_DIRS})
 
 # Find the OCCT and related libraries
@@ -577,7 +578,8 @@ target_link_libraries(libslic3r
     mcut
     JPEG::JPEG
     qoi
-    opencv_world
+    opencv_core
+    opencv_imgproc
     )
 
 if(NOT SLIC3R_STATIC)
-- 
2.47.1