From cdc2aca2cc070f78015d406f5254d7fd1147efe0 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 29 Nov 2017 15:57:32 +0300 Subject: [PATCH] cmake: fix iOS build with CMake 3.10 --- platforms/ios/cmake/Toolchains/common-ios-toolchain.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platforms/ios/cmake/Toolchains/common-ios-toolchain.cmake b/platforms/ios/cmake/Toolchains/common-ios-toolchain.cmake index 44ad57c..3eeb291 100644 --- a/platforms/ios/cmake/Toolchains/common-ios-toolchain.cmake +++ b/platforms/ios/cmake/Toolchains/common-ios-toolchain.cmake @@ -92,6 +92,13 @@ endif() if(NOT __IN_TRY_COMPILE) set(_xcodebuild_wrapper "${CMAKE_BINARY_DIR}/xcodebuild_wrapper") + if(NOT DEFINED CMAKE_MAKE_PROGRAM) # empty since CMake 3.10 + find_program(XCODEBUILD_PATH "xcodebuild") + if(NOT XCODEBUILD_PATH) + message(FATAL_ERROR "Specify CMAKE_MAKE_PROGRAM variable ('xcodebuild' absolute path)") + endif() + set(CMAKE_MAKE_PROGRAM "${XCODEBUILD_PATH}") + endif() if(NOT CMAKE_MAKE_PROGRAM STREQUAL _xcodebuild_wrapper) if(APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) set(_xcodebuild_wrapper_tmp "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/xcodebuild_wrapper") -- 2.7.4