opencv-3.4.0-disable-download.patch 1.0 KB

123456789101112131415161718192021222324252627282930
  1. --- a/CMakeLists.txt 2018-05-13 20:47:11.635871328 +0200
  2. +++ b/CMakeLists.txt 2018-05-13 20:47:49.289872617 +0200
  3. @@ -187,6 +187,7 @@
  4. # ----------------------------------------------------------------------------
  5. OCV_OPTION(OPENCV_ENABLE_NONFREE "Enable non-free algorithms" OFF)
  6. +OCV_OPTION(ENABLE_DOWNLOAD "Enable download during configure" ON)
  7. # 3rd party libs
  8. OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR APPLE)
  9. --- a/cmake/OpenCVDownload.cmake 2018-05-13 21:22:14.966943336 +0200
  10. +++ b/cmake/OpenCVDownload.cmake 2018-05-13 21:23:15.959945424 +0200
  11. @@ -32,6 +32,7 @@
  12. function(ocv_download)
  13. + if(ENABLE_DOWNLOAD)
  14. cmake_parse_arguments(DL "UNPACK;RELATIVE_URL" "FILENAME;HASH;DESTINATION_DIR;ID;STATUS" "URL" ${ARGN})
  15. macro(ocv_download_log)
  16. @@ -236,4 +237,7 @@
  17. if(OCV_DOWNLOAD_HASH_NAME)
  18. set(${OCV_DOWNLOAD_HASH_NAME} "${DL_HASH}" CACHE INTERNAL "")
  19. endif()
  20. + else()
  21. + message( "Download was disabled during configure phase by ENABLE_DOWNLOAD=OFF" )
  22. + endif()
  23. endfunction()