diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-24 17:06:02 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-09-27 18:29:44 +0200 |
commit | 5d840f0f7a575a5163800519d7ef7d4ba228135a (patch) | |
tree | ba4d8ed8f4e67a2ad41794cab6463d1af82d086f /cmake/QtTestHelpers.cmake | |
parent | c7d9e05a2bd55f03a01b5319338828197e81bc39 (diff) |
CMake: Get toolchain file path from EMSDK env for Wasm user projects
Try to to chainload the emscripten CMake toolchain file from the
EMSDK env var if it is set, instead of requiring the user to explicitly
specify a path to the file via QT_CHAINLOAD_TOOLCHAIN_FILE.
The order in which the toolchain file is chainloaded becomes is as
follows:
1) The initial toolchain file path that was specified when configuring
qtbase is set written as the initial value of
__qt_chainload_toolchain_file in qt.toolchain.cmake
2) If EMSDK env var is set, it overrides the value from 1)
3) If QT_CHAINLOAD_TOOLCHAIN_FILE cache var is supplied it overrides
the value from 2)
Whichever value ends up in __qt_chainload_toolchain_file is
checked too see if the file exists.
If it exists it gets included, if it doesn't, a warning is issued.
This checking logic is a bit crude and should be improved and unified
with the Android chainload checking, but the current change already
improves the behavior for users of Qt.
Pick-to: 6.2
Task-number: QTBUG-96843
Change-Id: I5da58a329f659086aaaee765c9399d0369021b22
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtTestHelpers.cmake')
0 files changed, 0 insertions, 0 deletions