diff options
author | Lorn Potter <lorn.potter@gmail.com> | 2021-08-30 19:48:22 +1000 |
---|---|---|
committer | Lorn Potter <lorn.potter@gmail.com> | 2021-09-01 08:02:08 +1000 |
commit | 375c7c47ff29d40ace4b489738510fac96997c21 (patch) | |
tree | 9c9aa8faf6f0e14615bbeece55376df43adbd973 /cmake | |
parent | 52473c7bf188f2803a44f0214e416ceb7e20841f (diff) |
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>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtAutoDetect.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake index ffa6028320..5c6cba89ae 100644 --- a/cmake/QtAutoDetect.cmake +++ b/cmake/QtAutoDetect.cmake @@ -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) |