aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlcachegen/qmlcachegen.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-02-04 17:29:46 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-02-12 14:03:45 +0100
commitea7024ef7bcae60c26d0470abb2ffeb56cac1875 (patch)
tree6cb4e9b4c8ab7462838d204d803eeffe6fbf105b /tools/qmlcachegen/qmlcachegen.cpp
parentf608b4143e09875bf0bc04a820ca013b959905b9 (diff)
CMake: Fix issue with Xcode common dep between qmllint and tooling
Sometimes when using the Xcode generator and there 2 or more Qml modules added in different subdirectories, you get an error like CMake Error in Bar/CMakeLists.txt: The custom command generating build_dir/Bar/B.qml is attached to multiple targets: Bar_qmllint Bar_tooling but none of these is a common dependency of the other(s). This is not allowed by the Xcode "new build system". The main reason for the error is that we accidentally make the _qmllint target depend on the qml files that are supposed to be copied by the _tooling target to the build dir, instead of making qmllint depend on the source files. The qmllint target queries the QT_QML_LINT_FILES property with a generator expression, but the values are relative qml file paths. Within the context of add_custom_command they evaluate to the build dir qml files that are copied by the _tooling target. To avoid the issue, ensure that QT_QML_LINT_FILES contains absolute paths to the qml files. This way it will not depend the output of the _tooling target and avoid the Xcode issue. It is not clear why the issue does not trigger when there is only one qml module in the project. But the fix applies nevertheless. Resembles 1bd0a5ce02352a600367beb5a5421c8f8332e1fe Pick-to: 6.2 6.3 Task-number: QTBUG-95763 Fixes: QTBUG-100307 Change-Id: Ie3af503635de3ca61ce5975dcd0983d4e19f259f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Diffstat (limited to 'tools/qmlcachegen/qmlcachegen.cpp')
0 files changed, 0 insertions, 0 deletions