File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,17 @@ endforeach ()
6464message (STATUS "Downloading Skia from ${ASSET_URL} with hash ${ASSET_HASH} " )
6565
6666set (SKIA_URL "${ASSET_URL} " )
67- string (REPLACE ":" "=" ASSET_HASH "${ASSET_HASH} " )
67+ string (REGEX REPLACE ":.*" "" ASSET_HASH_ALGO "${ASSET_HASH} " )
68+ string (REGEX REPLACE ".*:" "" ASSET_HASH_VALUE "${ASSET_HASH} " )
69+ string (TOUPPER "${ASSET_HASH_ALGO} " ASSET_HASH_ALGO)
6870
6971if (NOT ASSET_HASH)
7072 message (WARNING "Failed to find Skia hash, just checking for the files existence to determine if we need to download Skia again." )
7173 if (NOT EXISTS "${CMAKE_BINARY_DIR} /download/${ASSET_NAME} " )
7274 file (DOWNLOAD ${SKIA_URL} "${CMAKE_BINARY_DIR} /download/${ASSET_NAME} " STATUS SKIA_DOWNLOAD_STATUS SHOW_PROGRESS )
7375 endif ()
7476else ()
75- file (DOWNLOAD ${SKIA_URL} "${CMAKE_BINARY_DIR} /download/${ASSET_NAME} " STATUS SKIA_DOWNLOAD_STATUS EXPECTED_HASH "${ASSET_HASH } " SHOW_PROGRESS )
77+ file (DOWNLOAD ${SKIA_URL} "${CMAKE_BINARY_DIR} /download/${ASSET_NAME} " STATUS SKIA_DOWNLOAD_STATUS EXPECTED_HASH "${ASSET_HASH_ALGO} = ${ASSET_HASH_VALUE } " SHOW_PROGRESS )
7678endif ()
7779
7880list (GET SKIA_DOWNLOAD_STATUS 0 SKIA_DOWNLOAD_STATUS_CODE)
You can’t perform that action at this time.
0 commit comments