Skip to content

Commit

Permalink
iOS redundancies
Browse files Browse the repository at this point in the history
iOS simulator does not support requires GLES2.0 environment.
Remove all references to simulator.
Add support for armv7s (swift) arch.
  • Loading branch information
xsacha committed Feb 17, 2013
1 parent 8ba2769 commit 8c80641
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ if(ANDROID)
endif()

if (IOS)
if (${IOS_PLATFORM} STREQUAL "OS")
set(ARM ON)
endif()
set(ARM ON)
endif()

if(BLACKBERRY)
Expand Down
18 changes: 5 additions & 13 deletions ios/ios.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

# Options:
#
# IOS_PLATFORM = OS (default) or SIMULATOR
# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders
# IOS_PLATFORM = OS (default)
# This needs to be OS as the simulator cannot use the required GLES2.0 environment.
# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch.
# SIMULATOR - used to build for the Simulator platforms, which have an x86 arch.
#
# CMAKE_IOS_DEVELOPER_ROOT = automatic(default) or /path/to/platform/Developer folder
# By default this location is automatcially chosen based on the IOS_PLATFORM value above.
Expand Down Expand Up @@ -96,16 +95,11 @@ set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")
# Check the platform selection and setup for developer root
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")

# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")

# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. PPSSPP is unable to run on simulator")
else (${IOS_PLATFORM} STREQUAL "OS")
message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR")
message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or leave default")
endif (${IOS_PLATFORM} STREQUAL "OS")

# Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT
Expand Down Expand Up @@ -141,9 +135,7 @@ set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS su
# set the architecture for iOS
# NOTE: Currently both ARCHS_STANDARD_32_BIT and ARCHS_UNIVERSAL_IPHONE_OS set armv7 only, so set both manually
if (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_ARCH armv7)
else (${IOS_PLATFORM} STREQUAL "OS")
set (IOS_ARCH i386)
set (IOS_ARCH armv7 armv7s)
endif (${IOS_PLATFORM} STREQUAL "OS")

set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string "Build architecture for iOS")
Expand Down

0 comments on commit 8c80641

Please sign in to comment.