mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Check result of downloading WebView2 from CMake
Abort the build immediately if downloading failed instead of running into problems later. Closes #25457.
This commit is contained in:
committed by
Vadim Zeitlin
parent
dce8b09914
commit
3fc7ffc2ef
@@ -63,7 +63,14 @@ elseif(WXMSW)
|
||||
file(DOWNLOAD
|
||||
${WEBVIEW2_URL}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/webview2.nuget
|
||||
EXPECTED_HASH SHA256=${WEBVIEW2_SHA256})
|
||||
EXPECTED_HASH SHA256=${WEBVIEW2_SHA256}
|
||||
STATUS DOWNLOAD_RESULT)
|
||||
# Check that the download was successful.
|
||||
list(GET DOWNLOAD_RESULT 0 DOWNLOAD_RESULT_NUM)
|
||||
if(NOT ${DOWNLOAD_RESULT_NUM} EQUAL 0)
|
||||
list(GET DOWNLOAD_RESULT 1 DOWNLOAD_RESULT_STR)
|
||||
message(FATAL_ERROR "Error ${DOWNLOAD_RESULT_NUM} downloading WebView2 SDK: ${DOWNLOAD_RESULT_STR}.")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY ${WEBVIEW2_PACKAGE_DIR})
|
||||
execute_process(COMMAND
|
||||
"${CMAKE_COMMAND}" -E tar x "${CMAKE_CURRENT_BINARY_DIR}/webview2.nuget"
|
||||
|
||||
Reference in New Issue
Block a user