summaryrefslogtreecommitdiffstats
path: root/recipes-support/opencv/opencv/download.patch
diff options
context:
space:
mode:
authorChris Dimich <Chris.Dimich@boundarydevices.com>2021-03-01 16:27:43 -0800
committerOtavio Salvador <otavio@ossystems.com.br>2021-03-02 19:26:05 -0300
commit852bda2f1c87f2afaf697c6d3fc6d8c119d6e65a (patch)
treef176df277f2ce360a26cdaedf8c2c06ab8dc5e36 /recipes-support/opencv/opencv/download.patch
parentaedfe1557e82da6efa53c12b08dbacc38bb674b5 (diff)
downloadmeta-freescale-852bda2f1c87f2afaf697c6d3fc6d8c119d6e65a.tar.gz
opencv_4.4.0.imx: add recipe
Add recipe to support additional machine learning demos and tiny dnn. Signed-off-by: Chris Dimich <Chris.Dimich@boundarydevices.com> (cherry picked from commit dc6bebac65d3733548de568f31ca5bfbf9e8a8a5)
Diffstat (limited to 'recipes-support/opencv/opencv/download.patch')
-rw-r--r--recipes-support/opencv/opencv/download.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes-support/opencv/opencv/download.patch b/recipes-support/opencv/opencv/download.patch
new file mode 100644
index 00000000..33ac4831
--- /dev/null
+++ b/recipes-support/opencv/opencv/download.patch
@@ -0,0 +1,41 @@
1From b18a280fab06a680d9f831bf8b462647f3cb6214 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Thu, 9 Jan 2020 16:24:24 +0000
4Subject: [PATCH] opencv: abort configure if we need to download
5
6This CMake module will download files during do_configure. This is bad as it
7means we can't do offline builds.
8
9Add an option to disallow downloads by emitting a fatal error.
10
11Upstream-Status: Pending
12Signed-off-by: Ross Burton <ross.burton@intel.com>
13
14---
15 cmake/OpenCVDownload.cmake | 6 ++++++
16 1 file changed, 6 insertions(+)
17
18diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake
19index 63cf6d3238..4acf477f70 100644
20--- a/cmake/OpenCVDownload.cmake
21+++ b/cmake/OpenCVDownload.cmake
22@@ -14,6 +14,7 @@
23 # RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it
24 # Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is <opencv>/.cache
25
26+set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads")
27 set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files")
28 if(DEFINED ENV{OPENCV_DOWNLOAD_PATH})
29 set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}")
30@@ -156,6 +157,11 @@ function(ocv_download)
31
32 # Download
33 if(NOT EXISTS "${CACHE_CANDIDATE}")
34+ if(NOT OPENCV_ALLOW_DOWNLOADS)
35+ message(FATAL_ERROR "Not going to download ${DL_FILENAME}")
36+ return()
37+ endif()
38+
39 ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"")
40 foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST})
41 ocv_download_log("#try ${try}")