zeus migration: opencv: Fix warning applying this patch
https://jira.digi.com/browse/DEL-7013 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
f01a336d43
commit
2d3fbfc3d2
|
|
@ -1,10 +1,15 @@
|
||||||
This CMake module will download files during do_configure. This is bad as it
|
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
means we can't do offline builds.
|
Date: Thu, 16 Apr 2020 09:15:06 +0200
|
||||||
|
Subject: [PATCH] This CMake module will download files during do_configure.
|
||||||
|
This is bad as it means we can't do offline builds.
|
||||||
|
|
||||||
Add an option to disallow downloads by emitting a fatal error.
|
Add an option to disallow downloads by emitting a fatal error.
|
||||||
|
|
||||||
Upstream-Status: Pending
|
Upstream-Status: Pending
|
||||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||||
|
---
|
||||||
|
cmake/OpenCVDownload.cmake | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake
|
diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake
|
||||||
index 63cf6d3238..4acf477f70 100644
|
index 63cf6d3238..4acf477f70 100644
|
||||||
|
|
@ -13,13 +18,13 @@ index 63cf6d3238..4acf477f70 100644
|
||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
# RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it
|
# RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it
|
||||||
# Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is <opencv>/.cache
|
# Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is <opencv>/.cache
|
||||||
|
|
||||||
+set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads")
|
+set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads")
|
||||||
set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files")
|
set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files")
|
||||||
if(DEFINED ENV{OPENCV_DOWNLOAD_PATH})
|
if(DEFINED ENV{OPENCV_DOWNLOAD_PATH})
|
||||||
set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}")
|
set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}")
|
||||||
@@ -156,6 +157,11 @@ function(ocv_download)
|
@@ -156,6 +157,11 @@ function(ocv_download)
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
if(NOT EXISTS "${CACHE_CANDIDATE}")
|
if(NOT EXISTS "${CACHE_CANDIDATE}")
|
||||||
+ if(NOT OPENCV_ALLOW_DOWNLOADS)
|
+ if(NOT OPENCV_ALLOW_DOWNLOADS)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue