cmake: Don't notify/warn the user when Xcode is not found

We can technically build without Xcode, as long as the command line
tools are installed. We reflect that by an empty QT_MAC_XCODE_VERSION
variable.

Change-Id: I40ffa28a628157e0a2c63656065ea7c41a680e01
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 9991ca91633d77a86b31b594897aa871b6151888)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tor Arne Vestbø 2021-11-09 17:13:51 +01:00 committed by Qt Cherry-pick Bot
parent de2395d757
commit 0cde3d93f1

View File

@ -331,9 +331,6 @@ function(qt_internal_get_xcode_version out_var)
execute_process(COMMAND /usr/bin/xcrun xcodebuild -version
OUTPUT_VARIABLE xcode_version
ERROR_VARIABLE xcrun_error)
if(NOT xcode_version)
message(NOTICE "Can't determine Xcode version. Error: ${xcrun_error}")
endif()
string(REPLACE "\n" " " xcode_version "${xcode_version}")
string(STRIP "${xcode_version}" xcode_version)
set(${out_var} "${xcode_version}" PARENT_SCOPE)