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