From 52f665ebaf9b2f00bef0ca4cc72aec2050eb5707 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Thu, 6 Jul 2023 14:41:00 +0200 Subject: [PATCH] Silence the missing BundleIdentifier warning for non-Xcode generators It's a bit excessive to warn every developer about this, especially if they are using non-Xcode generators; besides, we are already generating a bundle identifier if it is missing anyway. Change-Id: Ib11ad51a0e516e0ea61ad2f7bf499b846bc0b792 Reviewed-by: Alexandru Croitor (cherry picked from commit 594b932c589f6ec538240d6b5022298f9abc3e95) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtPublicAppleHelpers.cmake | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cmake/QtPublicAppleHelpers.cmake b/cmake/QtPublicAppleHelpers.cmake index e0d10531e5f..7d9007ce63c 100644 --- a/cmake/QtPublicAppleHelpers.cmake +++ b/cmake/QtPublicAppleHelpers.cmake @@ -283,13 +283,15 @@ function(_qt_internal_get_default_apple_bundle_identifier target out_var) string(APPEND prefix ".${infix}") endif() - message(WARNING - "No organization bundle identifier prefix could be retrieved from Xcode preferences. \ - This can lead to code signing issues due to a non-unique bundle \ - identifier. Please set up an organization prefix by creating a new project within \ - Xcode, or consider providing a custom bundle identifier by specifying the \ - MACOSX_BUNDLE_GUI_IDENTIFIER or XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER property." - ) + if(CMAKE_GENERATOR STREQUAL "Xcode") + message(WARNING + "No organization bundle identifier prefix could be retrieved from Xcode preferences. \ + This can lead to code signing issues due to a non-unique bundle \ + identifier. Please set up an organization prefix by creating a new project within \ + Xcode, or consider providing a custom bundle identifier by specifying the \ + MACOSX_BUNDLE_GUI_IDENTIFIER or XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER property." + ) + endif() endif() # Escape the prefix according to rfc 1034, it's important for code-signing. If an invalid