From cfa9d88e073533f7505853b6ed9e34ee80d8310f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3FUTF-8=3Fq=3FGae=3DCC=3D88tan=3D20de=3D20Ville=3DCC?= =?UTF-8?q?=3D80le=3F=3D?= Date: Fri, 8 Dec 2023 13:14:16 +0100 Subject: [PATCH] cmake: fix build for iOS with CMake 3.28 --- contrib/iOS.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/iOS.cmake b/contrib/iOS.cmake index c929aa21a..933cd6bdc 100644 --- a/contrib/iOS.cmake +++ b/contrib/iOS.cmake @@ -28,6 +28,8 @@ # A macro used to find executable programs on the host system, not within the iOS environment. # Thanks to the android-cmake project for providing the command +cmake_minimum_required(VERSION 3.5) + # Standard settings set (CMAKE_SYSTEM_NAME Darwin) set (CMAKE_SYSTEM_VERSION 1) @@ -42,7 +44,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) @@ -132,7 +134,7 @@ endif () # Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT # Note Xcode 4.3 changed the installation location, choose the most recent one available -exec_program(/usr/bin/xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR) +execute_process(COMMAND /usr/bin/xcode-select -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) set (XCODE_POST_43_ROOT "${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer") set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer") if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)