mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Merge topic 'FindJNI-no-xcode' into release-3.30
7402593a08 FindJNI: Improve output on macOS if Xcode is not installed
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9750
This commit is contained in:
@@ -391,8 +391,10 @@ if(APPLE)
|
||||
execute_process(
|
||||
COMMAND xcodebuild -version
|
||||
OUTPUT_VARIABLE _FindJNI_XCODEBUILD_VERSION
|
||||
ERROR_VARIABLE _FindJNI_XCODEBUILD_VERSION
|
||||
RESULT_VARIABLE _FindJNI_XCODEBUILD_RESULT
|
||||
)
|
||||
if(_FindJNI_XCODEBUILD_VERSION MATCHES "Xcode ([0-9]+(\\.[0-9]+)*)")
|
||||
if(_FindJNI_XCODEBUILD_RESULT EQUAL 0 AND _FindJNI_XCODEBUILD_VERSION MATCHES "Xcode ([0-9]+(\\.[0-9]+)*)")
|
||||
set(_FindJNI_XCODE_VERSION "${CMAKE_MATCH_1}")
|
||||
else()
|
||||
set(_FindJNI_XCODE_VERSION "")
|
||||
|
||||
Reference in New Issue
Block a user