From 77dfa71f0618278ff974d0f274bb87fc36c91077 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 16 Dec 2022 11:23:54 +0100 Subject: Deploying Qt: Clean up .cpp.o(bj) files when deploying Qt These files are required when building against some static libraries that Qt ships. Since we don't link against these libraries, we used to remove them when we install Qt, but starting with Qt 6.5 some of these files are required by the Qt CMake files, and configuration would fail. So, we now have to remove them when deploying Qt, instead of already when installing Qt. Change-Id: Ie38ab3735b86df0372b946d6a808007b5ec84b88 Reviewed-by: Reviewed-by: Tim Jenssen --- scripts/deployqt.py | 7 +++++-- scripts/deployqtHelper_mac.sh | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/deployqt.py b/scripts/deployqt.py index 50eb3eb1253..05113e43e77 100755 --- a/scripts/deployqt.py +++ b/scripts/deployqt.py @@ -110,9 +110,12 @@ def is_ignored_windows_file(use_debug, basepath, filename): return False def ignored_qt_lib_files(path, filenames): + # Qt ships some unneeded object files in the qml plugins + # On Windows we also do not want to ship the wrong debug/release .dlls or .lib files etc if not common.is_windows_platform(): - return [] - return [fn for fn in filenames if is_ignored_windows_file(debug_build, path, fn)] + return [fn for fn in filenames if fn.endswith('.cpp.o')] + return [fn for fn in filenames + if fn.endswith('.cpp.obj') or is_ignored_windows_file(debug_build, path, fn)] def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir, qt_qml_dir, plugins): print("copying Qt libraries...") diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh index a4afd7f20a5..b33795ae4a7 100755 --- a/scripts/deployqtHelper_mac.sh +++ b/scripts/deployqtHelper_mac.sh @@ -145,6 +145,9 @@ if [ ! -d "$app_path/Contents/Frameworks/QtCore.framework" ]; then fi +# clean up unneeded object files that are part of Qt for some static libraries +find "$app_path" -ipath "*/objects-*" -delete + # clean up after macdeployqt # it deploys some plugins (and libs for these) that interfere with what we want echo "Cleaning up after macdeployqt..." -- cgit v1.2.3