diff options
author | Mike Achtelik <mike.achtelik@gmail.com> | 2021-09-30 20:54:16 +0200 |
---|---|---|
committer | Mike Achtelik <mike.achtelik@gmail.com> | 2021-10-12 17:36:57 +0000 |
commit | 91d8443f6d8169692b12b53f271b4f7add2fb46c (patch) | |
tree | 31ed33f45248eb2779c627be6eb1ddfc01f00841 /src/plugins/networkinformation | |
parent | 8513bcd90cc3900f9c32e59e0823f621ea6eea1d (diff) |
CMake: Fix adding generated resources on iOS with CMake and Xcode
When adding resources generated via a custom command, the project fails
to configure when targeting iOS with CMake and Xcode with the error:
CMake Error in src/CMakeLists.txt:
The custom command generating
src/.qsb/TestShader.frag.qsb
is attached to multiple targets:
TestApp_other_files
TestApp
but none of these is a common dependency of the other(s). This is
not allowed by the Xcode "new build system".
This happens e.g. when using qt6_add_shaders, which adds a custom
command to generate the qsb files. Or by simply adding resources via
qt6_add_resources, which depend on a custom command.
The problem is that qt6_add_resources also adds the resource to a
second "fake" target ${target}_other_files via
_qt_internal_process_resource and _qt_internal_expose_source_file_to_ide.
See c7d1874cd16ce86dfbab319e44fe3a387378fdff.
Since these targets do not have a common dependency CMake fails to
configure the project.
So lets fix it similar to change 1bd0a5ce02352a600367beb5a5421c8f8332e1fe
and let the ${target}_other_files depend in the main ${target}.
Pick-to: 6.2
Task-number: QTBUG-95763
Change-Id: Iecdb40993a91da8bfbf6553892f9b0722d2e886c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/plugins/networkinformation')
0 files changed, 0 insertions, 0 deletions