vcpkg/ports/opencv3/0001-disable-downloading.patch
Stefano Sinigardi 09019cbc9a
[OpenCV] fix protobuf references (#19770)
* [OpenCV] fix protobuf targets

* [OpenCV] fix port versions

* [OpenCV] fix references
2021-09-03 22:25:12 -07:00

13 lines
753 B
Diff

--- a/cmake/OpenCVDownload.cmake
+++ b/cmake/OpenCVDownload.cmake
@@ -157,6 +157,9 @@ function(ocv_download)
# Download
if(NOT EXISTS "${CACHE_CANDIDATE}")
ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"")
+ string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}")
+ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )")
+
foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST})
ocv_download_log("#try ${try}")
file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}"