From 80d680e82f545d3a0ae23aa65d07befbab57b71a Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Mon, 31 Mar 2025 12:48:59 +0300 Subject: [PATCH] Call xcrun from PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The xcrun binary may be installed in a different location when cross compiling to macOS using osxcross. Change-Id: I47398e8da19c42e5e9d1b595673048c56662ea2e Reviewed-by: Tor Arne Vestbø --- cmake/QtPublicAppleHelpers.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtPublicAppleHelpers.cmake b/cmake/QtPublicAppleHelpers.cmake index 9dccb10f55a..9af9bb8eb61 100644 --- a/cmake/QtPublicAppleHelpers.cmake +++ b/cmake/QtPublicAppleHelpers.cmake @@ -822,7 +822,7 @@ function(_qt_internal_get_apple_sdk_version out_var) set(sdk_name "macosx") endif() set(xcrun_version_arg "--show-sdk-version") - execute_process(COMMAND /usr/bin/xcrun --sdk ${sdk_name} ${xcrun_version_arg} + execute_process(COMMAND xcrun --sdk ${sdk_name} ${xcrun_version_arg} OUTPUT_VARIABLE sdk_version ERROR_VARIABLE xcrun_error) if(NOT sdk_version) @@ -836,7 +836,7 @@ endfunction() function(_qt_internal_get_xcode_version_raw out_var) if(APPLE) - execute_process(COMMAND /usr/bin/xcrun xcodebuild -version + execute_process(COMMAND xcrun xcodebuild -version OUTPUT_VARIABLE xcode_version ERROR_VARIABLE xcrun_error) string(REPLACE "\n" " " xcode_version "${xcode_version}")