diff --git a/local/recipes/qt/qtdeclarative/recipe.toml b/local/recipes/qt/qtdeclarative/recipe.toml index f5eeef4cb9..64fd38b37f 100644 --- a/local/recipes/qt/qtdeclarative/recipe.toml +++ b/local/recipes/qt/qtdeclarative/recipe.toml @@ -131,8 +131,17 @@ rm -f CMakeCache.txt rm -rf CMakeFiles # Fix: qt_internal_add_resource creates empty targets in cross-compilation -# We patch the qmltyperegistrar CMakeLists to avoid this issue -sed -i 's/qt_internal_add_resource(QmlTypeRegistrarPrivate "jsRootMetaTypes"/qt_internal_add_resource(QmlTypeRegistrarPrivate "jsRootMetaTypes"\n OPTIONS\n --no-compress/' "${COOKBOOK_SOURCE}/src/qmltyperegistrar/CMakeLists.txt" +# We patch the qmltyperegistrar CMakeLists to add OPTIONS --no-compress +python - <<'PY' +import os +from pathlib import Path +path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/qmltyperegistrar/CMakeLists.txt" +text = path.read_text() +old = 'qt_internal_add_resource(QmlTypeRegistrarPrivate "jsRootMetaTypes"' +new = 'qt_internal_add_resource(QmlTypeRegistrarPrivate "jsRootMetaTypes"\n OPTIONS\n --no-compress' +text = text.replace(old, new) +path.write_text(text) +PY redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules