From 9959090da84ee8681126da5763365e3e2a746f7e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 21 Sep 2020 10:58:10 +0200 Subject: [PATCH] CMake: Fix failing tests on macOS developer builds tst_qguiapplication was missing an Info.plist file. We can't directly reference the tst_qcoreapplication Info.plist file like the qmake project does, because that breaks ninja (says multiple rules create the same output file), so use a copy instead. Blacklist the qpluginloader loadMachO test when doing CMake builds. The qmake projects use multiple custom rules to build the macho plugins, which need to be ported to CMake. Task-number: QTBUG-86053 Task-number: QTBUG-86792 Change-Id: Iaff2b2d5e9e84a457b4f2ffc011a580388498f00 Reviewed-by: Qt CI Bot Reviewed-by: Joerg Bornemann --- tests/auto/corelib/plugin/qpluginloader/BLACKLIST | 2 ++ tests/auto/gui/kernel/qguiapplication/CMakeLists.txt | 6 ++++++ tests/auto/gui/kernel/qguiapplication/Info.plist | 8 ++++++++ 3 files changed, 16 insertions(+) create mode 100644 tests/auto/corelib/plugin/qpluginloader/BLACKLIST create mode 100644 tests/auto/gui/kernel/qguiapplication/Info.plist diff --git a/tests/auto/corelib/plugin/qpluginloader/BLACKLIST b/tests/auto/corelib/plugin/qpluginloader/BLACKLIST new file mode 100644 index 0000000000..bfcfdff61b --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/BLACKLIST @@ -0,0 +1,2 @@ +[loadMachO] +macos cmake diff --git a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt index d7219585a5..0347b3cc4a 100644 --- a/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt +++ b/tests/auto/gui/kernel/qguiapplication/CMakeLists.txt @@ -43,6 +43,12 @@ qt_add_resource(tst_qguiapplication "tst_qguiapplication" ${tst_qguiapplication_resource_files} ) +# special case begin +if (APPLE) + set_property(TARGET tst_qguiapplication PROPERTY MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") + set_property(TARGET tst_qguiapplication PROPERTY PROPERTY MACOSX_BUNDLE TRUE) +endif() +# special case end ## Scopes: ##################################################################### diff --git a/tests/auto/gui/kernel/qguiapplication/Info.plist b/tests/auto/gui/kernel/qguiapplication/Info.plist new file mode 100644 index 0000000000..a2927358bc --- /dev/null +++ b/tests/auto/gui/kernel/qguiapplication/Info.plist @@ -0,0 +1,8 @@ + + + + + CFBundleVersion + 1.2.3 + +