diff options
author | wsnipex <wsnipex@a1.net> | 2018-05-22 17:00:00 +0200 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2018-05-22 17:00:00 +0200 |
commit | 9da57abd08e61f6342fd3e0bef05f500601cffe5 (patch) | |
tree | 5da78a95b31c2693e3f31d940c9415ed5b932995 /cmake | |
parent | a4439d651557fad84ddb98cbe8024337ac8b9353 (diff) |
[cmake] HandleDepends: add file hash checking
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/scripts/common/HandleDepends.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/scripts/common/HandleDepends.cmake b/cmake/scripts/common/HandleDepends.cmake index fb110d617c..bcf06cf955 100644 --- a/cmake/scripts/common/HandleDepends.cmake +++ b/cmake/scripts/common/HandleDepends.cmake @@ -231,8 +231,15 @@ function(add_addon_depends addon searchpath) -DCMAKE_INCLUDE_PATH=${OUTPUT_DIR}/include) endif() + if(EXISTS ${dir}/${id}.sha256) + file(STRINGS ${dir}/${id}.sha256 sha256sum) + list(GET sha256sum 0 sha256sum) + set(URL_HASH_COMMAND URL_HASH SHA256=${sha256sum}) + endif() + externalproject_add(${id} URL ${url} + "${URL_HASH_COMMAND}" DOWNLOAD_DIR ${BUILD_DIR}/download CONFIGURE_COMMAND ${CONFIGURE_COMMAND} "${EXTERNALPROJECT_SETUP}") |