mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Replaced deprecated exec_program function in CMake scripts with execute_process, as this was causing iOS build to fail with CMake 3.28
This commit is contained in:
parent
67feaa0bd3
commit
5a74cf33e9
@ -59,7 +59,7 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
set(OPENGL_ES 0)
|
||||
|
||||
# detect OS X version. (use '/usr/bin/sw_vers -productVersion' to extract V from '10.V.x'.)
|
||||
EXEC_PROGRAM(/usr/bin/sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW)
|
||||
execute_process(COMMAND /usr/bin/sw_vers -productVersion OUTPUT_VARIABLE MACOSX_VERSION_RAW)
|
||||
STRING(REGEX REPLACE "10\\.([0-9]+).*" "\\1" MACOSX_VERSION "${MACOSX_VERSION_RAW}")
|
||||
|
||||
if(${MACOSX_VERSION} LESS 7)
|
||||
|
@ -54,7 +54,7 @@ set (CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment
|
||||
# Determine the cmake host system version so we know where to find the iOS SDKs
|
||||
find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
|
||||
if (CMAKE_UNAME)
|
||||
exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||
execute_process(COMMAND uname -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
|
||||
string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
endif (CMAKE_UNAME)
|
||||
|
||||
@ -123,7 +123,7 @@ else ()
|
||||
endif ()
|
||||
|
||||
# Setup iOS developer location unless specified manually with IOS_DEVELOPER_ROOT
|
||||
exec_program(/usr/bin/xcode-select ARGS -print-path OUTPUT_VARIABLE XCODE_DEVELOPER_DIR)
|
||||
execute_process(COMMAND /usr/bin/xcode-select -print-path OUTPUT_VARIABLE XCODE_DEVELOPER_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set (IOS_DEVELOPER_ROOT "${XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer" CACHE PATH "Location of iOS Platform")
|
||||
|
||||
# Find and use the most recent iOS sdk unless specified manually with IOS_SDK_ROOT
|
||||
|
Loading…
Reference in New Issue
Block a user