Files
RedBear-OS/local/recipes/qt/qtdeclarative/01-fix-resource-target.patch
T

22 lines
858 B
Diff

# Fix for qt_internal_add_resource generating empty targets
# The issue is that qt_internal_add_resource creates a target with no sources
# when cross-compiling. This patch adds a dummy source to the resource target.
#
# Apply to: src/qmltyperegistrar/CMakeLists.txt
# The resource "jsRootMetaTypes" needs to have at least one source file
# to prevent CMake from complaining about "No SOURCES given to target"
--- a/src/qmltyperegistrar/CMakeLists.txt
+++ b/src/qmltyperegistrar/CMakeLists.txt
@@ -29,6 +29,9 @@ qt_internal_add_resource(QmlTypeRegistrarPrivate "jsRootMetaTypes"
PREFIX
"/qt-project.org/meta_types"
FILES
jsroot_metatypes.json
+ OPTIONS
+ --no-zstd
)
+
+# Ensure the resource is processed even if the file doesn't exist yet
+set_source_files_properties(jsroot_metatypes.json PROPERTIES GENERATED TRUE)