summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch')
-rw-r--r--meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch87
1 files changed, 87 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch b/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch
new file mode 100644
index 0000000000..dd3c9a7a82
--- /dev/null
+++ b/meta-oe/recipes-support/opencv/opencv/0001-FROMLIST-Switch-to-static-instance-of-FastCV-on-Linux.patch
@@ -0,0 +1,87 @@
1From e517347450636012e5f7a65a504e4ac9e1224c50 Mon Sep 17 00:00:00 2001
2From: Alexander Smorkalov <alexander.smorkalov@opencv.ai>
3Date: Thu, 13 Feb 2025 09:17:08 +0300
4Subject: [PATCH] FROMLIST: Switch to static instance of FastCV on Linux.
5
6Signed-off-by: Alexander Smorkalov <alexander.smorkalov@opencv.ai>
7Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/26917]
8---
9 3rdparty/fastcv/fastcv.cmake | 7 ++++---
10 cmake/OpenCVFindLibsPerf.cmake | 21 +++++++++++++++------
11 2 files changed, 19 insertions(+), 9 deletions(-)
12
13diff --git a/3rdparty/fastcv/fastcv.cmake b/3rdparty/fastcv/fastcv.cmake
14index b8172705ca..5c81c11300 100644
15--- a/3rdparty/fastcv/fastcv.cmake
16+++ b/3rdparty/fastcv/fastcv.cmake
17@@ -1,7 +1,7 @@
18 function(download_fastcv root_dir)
19
20 # Commit SHA in the opencv_3rdparty repo
21- set(FASTCV_COMMIT "dc5d58018f3af915a8d209386d2c58c0501c0f2c")
22+ set(FASTCV_COMMIT "f4413cc2ab7233fdfc383a4cded402c072677fb0")
23
24 # Define actual FastCV versions
25 if(ANDROID)
26@@ -16,14 +16,15 @@ function(download_fastcv root_dir)
27 endif()
28 elseif(UNIX AND NOT APPLE AND NOT IOS AND NOT XROS)
29 if(AARCH64)
30- set(FCV_PACKAGE_NAME "fastcv_linux_aarch64_2024_12_11.tgz")
31- set(FCV_PACKAGE_HASH "7b33ad833e6f15ab6d4ec64fa3c17acd")
32+ set(FCV_PACKAGE_NAME "fastcv_linux_aarch64_2025_02_12.tgz")
33+ set(FCV_PACKAGE_HASH "33ac2a59cf3e7d6402eee2e010de1202")
34 else()
35 message("FastCV: fastcv lib for 32-bit Linux is not supported for now!")
36 endif()
37 endif(ANDROID)
38
39 # Download Package
40+
41 set(OPENCV_FASTCV_URL "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${FASTCV_COMMIT}/fastcv/")
42
43 ocv_download( FILENAME ${FCV_PACKAGE_NAME}
44diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake
45index c2380e6ce5..c5fb628c44 100644
46--- a/cmake/OpenCVFindLibsPerf.cmake
47+++ b/cmake/OpenCVFindLibsPerf.cmake
48@@ -181,7 +181,14 @@ endif(WITH_KLEIDICV)
49 if(WITH_FASTCV)
50 if((EXISTS ${FastCV_INCLUDE_PATH}) AND (EXISTS ${FastCV_LIB_PATH}))
51 message(STATUS "Use external FastCV ${FastCV_INCLUDE_PATH}, ${FastCV_LIB_PATH}")
52- set(HAVE_FASTCV TRUE CACHE BOOL "FastCV status")
53+ find_library(FASTCV_LIBRARY NAMES "fastcv"
54+ PATHS "${FastCV_LIB_PATH}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
55+ mark_as_advanced(FASTCV_LIBRARY)
56+ if (FASTCV_LIBRARY)
57+ set(HAVE_FASTCV TRUE CACHE BOOL "FastCV status")
58+ else()
59+ set(HAVE_FASTCV FALSE CACHE BOOL "FastCV status")
60+ endif()
61 else()
62 include("${OpenCV_SOURCE_DIR}/3rdparty/fastcv/fastcv.cmake")
63 set(FCV_ROOT_DIR "${OpenCV_BINARY_DIR}/3rdparty/fastcv")
64@@ -190,13 +197,15 @@ if(WITH_FASTCV)
65 set(FastCV_INCLUDE_PATH "${FCV_ROOT_DIR}/inc" CACHE PATH "FastCV includes directory")
66 set(FastCV_LIB_PATH "${FCV_ROOT_DIR}/libs" CACHE PATH "FastCV library directory")
67 ocv_install_3rdparty_licenses(FastCV "${OpenCV_BINARY_DIR}/3rdparty/fastcv/LICENSE")
68- install(FILES "${FastCV_LIB_PATH}/libfastcvopt.so"
69- DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "bin")
70+ if(ANDROID)
71+ set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcvopt.so" CACHE PATH "FastCV library")
72+ install(FILES "${FASTCV_LIBRARY}" DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "bin")
73+ else()
74+ set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcv.a" CACHE PATH "FastCV library")
75+ install(FILES "${FASTCV_LIBRARY}" DESTINATION "${OPENCV_LIB_INSTALL_PATH}" COMPONENT "dev")
76+ endif()
77 else()
78 set(HAVE_FASTCV FALSE CACHE BOOL "FastCV status")
79 endif()
80 endif()
81- if(HAVE_FASTCV)
82- set(FASTCV_LIBRARY "${FastCV_LIB_PATH}/libfastcvopt.so" CACHE PATH "FastCV library")
83- endif()
84 endif(WITH_FASTCV)
85--
862.34.1
87