mirror of https://github.com/axmolengine/axmol.git
Fix cmake issue [ci build]
Avoid cause check_include_file return unexpected result.
This commit is contained in:
parent
c635091618
commit
6aea443282
|
@ -3,6 +3,7 @@
|
|||
# everyting for cmake toolchain config before project(xxx) is better
|
||||
set(CMAKE_SYSTEM_NAME "iOS" CACHE STRING "The CMake system name for iOS")
|
||||
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
|
||||
${CMAKE_TRY_COMPILE_PLATFORM_VARIABLES}
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED"
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
|
||||
|
|
|
@ -28,36 +28,6 @@
|
|||
# build libcocos2d
|
||||
# build luacocos2d if BUILD_LUA_LIBS=ON
|
||||
|
||||
# The workaround for solve try_compile failed with code sign
|
||||
# since cmake-3.18.2, not required
|
||||
# everyting for cmake toolchain config before project(xxx) is better
|
||||
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED"
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED NO)
|
||||
|
||||
# Fix compile failed with armv7 deployment target >= 11.0, xcode clang will report follow error
|
||||
# clang: error: invalid iOS deployment version '--target=armv7-apple-ios13.6',
|
||||
# iOS 10 is the maximum deployment target for 32-bit targets
|
||||
# If not defined CMAKE_OSX_DEPLOYMENT_TARGET, cmake will choose latest deployment target
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ".*armv7.*")
|
||||
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET
|
||||
OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_GREATER "11.0"
|
||||
OR "${CMAKE_OSX_DEPLOYMENT_TARGET}" VERSION_EQUAL "11.0")
|
||||
message(STATUS "Sets iOS minimum deployment target to 10.0 for armv7")
|
||||
# a. armv7 maximum deployment 10.x
|
||||
# b. armv7 TLS require deployment 10.x
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.0" CACHE STRING "Minimum OS X deployment version")
|
||||
endif()
|
||||
else()
|
||||
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "9.0" CACHE STRING "Minimum OS X deployment version")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# The version number
|
||||
set(ENGINEX_VERSION 1.0)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.0.2)
|
|||
# The workaround for try_compile failing with code signing
|
||||
# since cmake-3.18.2, not required
|
||||
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
|
||||
${CMAKE_TRY_COMPILE_PLATFORM_VARIABLES}
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED"
|
||||
"CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
|
||||
|
|
Loading…
Reference in New Issue