diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-07-21 16:11:44 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-07-23 18:16:01 +0200 |
commit | c3f163fbb173bddd91ca7fdb8db1fb45793c4f4c (patch) | |
tree | 2252d4164085985dfaf7f515c462a75adaa8d2f7 /examples/scxml | |
parent | 86c707b2498865a0c8adfdfbf558423a63871a52 (diff) |
CMake: Work around CMake 3.21.0 AUTOUIC issue with cross config Ninja
A few qtscxml examples fail to build in-tree with the libraries build
when using CMake 3.21.0 + Ninja Multi-Config + cross config mode
enabled.
The example targets use AUTOUIC with ui files pointing to parent
directories and that somehow causes a ninja dependency issue.
Work around the issue by excluding those examples from the build when
using NMC + cross config.
In our CI that means the Windows -debug-and-release builds.
Pick-to: 6.2
Task-number: QTBUG-95305
Change-Id: I631256bfa4258f8d9cbe1e947f76cf4d4c56b385
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/scxml')
-rw-r--r-- | examples/scxml/CMakeLists.txt | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/scxml/CMakeLists.txt b/examples/scxml/CMakeLists.txt index 29cdff0..434464b 100644 --- a/examples/scxml/CMakeLists.txt +++ b/examples/scxml/CMakeLists.txt @@ -7,13 +7,16 @@ endif() if(TARGET Qt::Widgets) add_subdirectory(trafficlight-widgets-static) add_subdirectory(trafficlight-widgets-dynamic) -if (QT_FEATURE_scxml_ecmascriptdatamodel) - add_subdirectory(mediaplayer-widgets-static) - add_subdirectory(mediaplayer-widgets-dynamic) - add_subdirectory(calculator-widgets) - add_subdirectory(pinball) - add_subdirectory(sudoku) -endif() + if(QT_FEATURE_scxml_ecmascriptdatamodel) + # Work around QTBUG-95305 + if(NOT (CMAKE_GENERATOR STREQUAL "Ninja Multi-Config" AND CMAKE_CROSS_CONFIGS)) + add_subdirectory(mediaplayer-widgets-static) + add_subdirectory(mediaplayer-widgets-dynamic) + endif() + add_subdirectory(calculator-widgets) + add_subdirectory(pinball) + add_subdirectory(sudoku) + endif() endif() if(TARGET Qt::Qml AND TARGET Qt::Gui) |