Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Fix undefined symbol: qt_resourceFeatureZstd issue
When cross-compiling, host rcc might generate zstd compressed resources, even though the target might not support zstd decompression. To avoid that, we made sure to disable zstd compression when using cmake api like qt_add_resources if the target platform does not support it. We did not do it for CMAKE_AUTORCC though. In such a situation, the linker would fail with: error: undefined symbol: qt_resourceFeatureZstd Add the --no-zstd option to AUTORCC_OPTIONS for targets that are created by Qt CMake public API like qt_add_executable and qt_add_library if the target platform does not support zstd decompression (check via the QT_FEATURE_zstd variable). This in turn applies to our own qt_internal_add_ API as well. Allow opting out via the QT_NO_AUTORCC_ZSTD CMake variable. [ChangeLog][Build System] Targets created with qt_add_executable and qt_add_library will now add the --no-zstd option to AUTORCC_OPTIONS when the target platform does not support zstd decompression. You can opt out via the QT_NO_AUTORCC_ZSTD cmake variable. Pick-to: 6.6 6.5 Fixes: QTBUG-121948 Task-number: QTBUG-106466 Task-number: QTBUG-101353 Change-Id: Ibdcfecd9a4b1e206479a3f4588b1b624dd91e122 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 329dbfc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Loading branch information