From 2ed267c82015f5eab7fe65aad6553eb0d6bb338d Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 27 Sep 2021 12:27:23 +0200 Subject: CMake: Show error in user projects if wasm toolchain file not found Rather than fail with obscure can't find Qt packages errors when the Webassembly CMake toolchain file can not be found, error out with a clear error on how to ensure it is found. Pick-to: 6.2 Task-number: QTBUG-96843 Change-Id: I0f34cdcde05efb25c93017f3fd365186335ed52c Reviewed-by: Joerg Bornemann --- cmake/qt.toolchain.cmake.in | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmake/qt.toolchain.cmake.in') diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in index 9a8019a3da..38a7431620 100644 --- a/cmake/qt.toolchain.cmake.in +++ b/cmake/qt.toolchain.cmake.in @@ -43,10 +43,13 @@ if(__qt_chainload_toolchain_file) "'${__qt_chainload_toolchain_file}' does not exist.") else() include("${__qt_chainload_toolchain_file}") + set(__qt_chainload_toolchain_file_included TRUE) endif() unset(__qt_chainload_toolchain_file) endif() +@init_post_chainload_toolchain@ + # Compute dynamically the Qt installation prefix from the location of this file. This allows # the usage of the toolchain file when the Qt installation is relocated. get_filename_component(QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX -- cgit v1.2.3