Skip to content

Commit

Permalink
add defualt ios deloyment target (#20282)
Browse files Browse the repository at this point in the history
* add defualt ios deloyment target
  • Loading branch information
coulsonwang authored and minggo committed Nov 1, 2019
1 parent b852fc3 commit 8126cfa
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cocos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ if(WINDOWS)
set_source_files_properties(${COCOS_SPINE_SRC} base/ccFPSImages.c PROPERTIES LANGUAGE CXX)
endif()

if(XCODE)
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(cocos2d IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()

#if(XCODE)
# # Later versions of Xcode clang want to compile C++17 with aligned allocation turned on and this is only supported on iOS 11.0+
# # TODO: Only turn this off if ${CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET} < 11.0
Expand Down
3 changes: 3 additions & 0 deletions templates/cpp-template-default/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ if(APPLE)
elseif(IOS)
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(${APP_NAME} IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()

# For code-signing, set the DEVELOPMENT_TEAM:
Expand Down
3 changes: 3 additions & 0 deletions templates/lua-template-default/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ if(APPLE)
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(${APP_NAME} IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()
elseif(WINDOWS)
cocos_copy_target_dll(${APP_NAME})
Expand Down
3 changes: 3 additions & 0 deletions tests/cpp-empty-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ if(XCODE)
elseif(IOS)
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(${APP_NAME} IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()

# For code-signing, set the DEVELOPMENT_TEAM:
Expand Down
3 changes: 3 additions & 0 deletions tests/cpp-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ if(APPLE)
elseif(IOS)
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(${APP_NAME} IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()

# For code-signing, set the DEVELOPMENT_TEAM:
Expand Down
3 changes: 3 additions & 0 deletions tests/lua-empty-test/project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ if(APPLE)
elseif(IOS)
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios/Info.plist")
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(${APP_NAME} IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()

# For code-signing, set the DEVELOPMENT_TEAM:
Expand Down
3 changes: 3 additions & 0 deletions tests/lua-tests/project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ if(APPLE)
elseif(IOS)
set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
set_xcode_property(${APP_NAME} IPHONEOS_DEPLOYMENT_TARGET "8.0")
endif()
endif()

# For code-signing, set the DEVELOPMENT_TEAM:
Expand Down

0 comments on commit 8126cfa

Please sign in to comment.