From aaa79cf73512a16724f084450025d223154b9f9e Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 20 Aug 2021 14:27:25 +0200 Subject: [PATCH] CMake: Fix automatic iOS bundle id extraction If no Xcode preferences file was found, _qt_internal_get_ios_bundle_identifier_prefix accidentally assigned the error output of running PlistBuddy to the bundle id property. That resulted in a bundle id called '${team_id}.Doesn't Exist, Will Create: /Users/qt/Library/Preferences/com.apple.dt.Xcode.plist\n.app' Check that the error variable is empty before assigning. Amends 4d838dae5a821e9e5f013ba1d5a494ece1b5180e Task-number: QTBUG-95838 Change-Id: I3a7241528590ae3e9986cfa1f3e91ac983ef54f6 Reviewed-by: Joerg Bornemann (cherry picked from commit 5a437d2590765a80236efad82e79654ebb3b4469) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/Qt6CoreMacros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index dcc71a57ba0..3615b2ebaeb 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -661,7 +661,7 @@ function(_qt_internal_get_ios_bundle_identifier_prefix out_var) message(DEBUG "Failed to extract the default bundle indentifier prefix.") endif() - if(prefix) + if(prefix AND NOT prefix_error) set_property(GLOBAL PROPERTY _qt_internal_ios_bundle_identifier_prefix "${prefix}") set("${out_var}" "${prefix}" PARENT_SCOPE) endif()