BUG: Allow third component of Mac OSX sw_vers output to be empty. Mac OSX 10.5 was recently reinstalled on dashmacmini3 and pointed out the fact that this expression is faulty when the reported version is simply 10.5 rather than 10.5.x... for example. This fixes it.
This commit is contained in:
parent
ab629e28f3
commit
553ddde8d1
|
@ -74,7 +74,7 @@ ENDIF(NOT _CMAKE_OSX_SDKS)
|
|||
|
||||
# Set CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT to the current version of OS X
|
||||
EXECUTE_PROCESS(COMMAND sw_vers -productVersion OUTPUT_VARIABLE CURRENT_OSX_VERSION)
|
||||
STRING(REGEX REPLACE "^.*(10)\\.([0-9]+)\\.([0-9]+).*$" "\\1.\\2"
|
||||
STRING(REGEX REPLACE "^.*(10)\\.([0-9]+)\\.*([0-9]+)*.*$" "\\1.\\2"
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT ${CURRENT_OSX_VERSION})
|
||||
|
||||
# Set CMAKE_OSX_SYSROOT_DEFAULT based on CMAKE_OSX_DEPLOYMENT_TARGET_DEFAULT.
|
||||
|
|
Loading…
Reference in New Issue