|
|
@ -25,6 +25,7 @@ function(download_file URL DEST EXPECTED_MD5)
|
|
|
|
get_filename_component(FILENAME "${URL}" NAME)
|
|
|
|
get_filename_component(FILENAME "${URL}" NAME)
|
|
|
|
file_md5_if_exists("${DEST}" CUR_MD5)
|
|
|
|
file_md5_if_exists("${DEST}" CUR_MD5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(NOT "${EXPECTED_MD5}" STREQUAL "${CUR_MD5}")
|
|
|
|
search_downloads(${EXPECTED_MD5} DLPATH)
|
|
|
|
search_downloads(${EXPECTED_MD5} DLPATH)
|
|
|
|
if(NOT("${DLPATH}" STREQUAL ""))
|
|
|
|
if(NOT("${DLPATH}" STREQUAL ""))
|
|
|
|
message("* Copying ${FILENAME} from ${DLPATH}")
|
|
|
|
message("* Copying ${FILENAME} from ${DLPATH}")
|
|
|
@ -34,7 +35,6 @@ function(download_file URL DEST EXPECTED_MD5)
|
|
|
|
return()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if(NOT "${EXPECTED_MD5}" STREQUAL "${CUR_MD5}")
|
|
|
|
|
|
|
|
message("* Downloading ${FILENAME}")
|
|
|
|
message("* Downloading ${FILENAME}")
|
|
|
|
file(DOWNLOAD "${URL}" "${DEST}" EXPECTED_MD5 "${EXPECTED_MD5}" SHOW_PROGRESS)
|
|
|
|
file(DOWNLOAD "${URL}" "${DEST}" EXPECTED_MD5 "${EXPECTED_MD5}" SHOW_PROGRESS)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|