Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various gfx_api / shadow tweaks and fixes #3451

Merged
merged 14 commits into from
Nov 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[CMake] Use already-downloaded prebuilt packages if present
past-due committed Nov 2, 2023
commit 252f7aa925bcc447ab3629964f9887841920503b
10 changes: 10 additions & 0 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -43,6 +43,16 @@ function(WZ_FETCH_PREBUILT_PACKAGE PACKAGE_URL PACKAGE_FILENAME PACKAGE_SHA512 O
endif()
endif()

# Check if file already exists at output path
if (EXISTS "${OUTPUT_PATH}")
file(SHA512 "${OUTPUT_PATH}" _dl_received_sha512)
if("${_dl_received_sha512}" STREQUAL "${PACKAGE_SHA512}")
message(STATUS "Found: Already downloaded prebuilt package: ${OUTPUT_PATH}, with hash: ${PACKAGE_SHA512}")
set(${STATUS} TRUE PARENT_SCOPE)
return()
endif()
endif()

# Try to download the prebuilt package
file(DOWNLOAD "${PACKAGE_URL}" "${OUTPUT_PATH}" INACTIVITY_TIMEOUT 60 SHOW_PROGRESS STATUS _dl_status TLS_VERIFY ON)
list(GET _dl_status 0 _dl_status_code)