diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 620d893abd9..e58ebd5d2be 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -410,6 +410,18 @@ endif() # qt6_add_big_resources(outfiles inputfile ... ) function(qt6_add_big_resources outfiles ) + if(CMAKE_GENERATOR STREQUAL "Xcode" AND IOS) + message(WARNING + "Due to CMake limitations, qt6_add_big_resources can't be used when building for iOS. " + "See https://bugreports.qt.io/browse/QTBUG-103497 for details. " + "Falling back to using qt6_add_resources. " + "Consider using qt6_add_resources directly to silence this warning." + ) + qt6_add_resources(${ARGV}) + set(${outfiles} ${${outfiles}} PARENT_SCOPE) + return() + endif() + if (CMAKE_VERSION VERSION_LESS 3.9) message(FATAL_ERROR, "qt6_add_big_resources requires CMake 3.9 or newer") endif() diff --git a/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc b/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc index 8cb78cf9c15..5ae7b9728ba 100644 --- a/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc +++ b/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc @@ -38,6 +38,10 @@ to binaries would be too time consuming or memory intensive. needs to be added as a source file to a CMake target and have the property \c{SKIP_AUTORCC} set to \c{ON}. +\warning This command is not supported when building for iOS, use +\l qt_add_resources instead. +See \l{https://bugreports.qt.io/browse/QTBUG-103497}{QTBUG-103497} for details. + \section1 Arguments You can set additional \c{OPTIONS} that should be added to the \c{rcc} calls.