wasm: fail when configuring for wasm and EMSDK is not found

Pick-to: 6.2
Change-Id: Ic7fb933d8c2b42c3ba84a3b5a6c89a808d971bd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Lorn Potter 2021-08-30 19:48:22 +10:00
parent 52473c7bf1
commit 375c7c47ff

View File

@ -17,7 +17,12 @@ function(qt_internal_ensure_static_qt_config)
endfunction()
function(qt_auto_detect_wasm)
if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "wasm-emscripten" AND DEFINED ENV{EMSDK})
if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "wasm-emscripten")
if (NOT DEFINED ENV{EMSDK})
message(FATAL_ERROR
"Can't find EMSDK! Make sure EMSDK environment variable "
"is available and emcc is in your path.")
endif()
if(NOT DEFINED QT_AUTODETECT_WASM)
# detect EMSCRIPTEN_ROOT path
file(READ "$ENV{EMSDK}/.emscripten" ver)