Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Add variables to ios toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Dec 18, 2013
1 parent 96aa74b commit 25096a8
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions ios.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,54 @@ if(NOT IOS_SDK_VERSION)
polly_fatal_error("iOS version not found, tested: [${IOS_SDK_VERSIONS}]")
endif()

# iPhone simulator root
set(
IPHONESIMULATOR_ROOT
"${XCODE_DEVELOPER_ROOT}/Platforms/iPhoneSimulator.platform/Developer"
)
if(NOT EXISTS "${IPHONESIMULATOR_ROOT}")
polly_fatal_error(
"IPHONESIMULATOR_ROOT not found (${IPHONESIMULATOR_ROOT})\n"
"XCODE_DEVELOPER_ROOT: ${XCODE_DEVELOPER_ROOT}\n"
)
endif()

# iPhone simulator SDK root
set(
IPHONESIMULATOR_SDK_ROOT
"${IPHONESIMULATOR_ROOT}/SDKs/iPhoneSimulator${IOS_SDK_VERSION}.sdk"
)

if(NOT EXISTS ${IPHONESIMULATOR_SDK_ROOT})
polly_fatal_error(
"IPHONESIMULATOR_SDK_ROOT not found (${IPHONESIMULATOR_SDK_ROOT})\n"
"IPHONESIMULATOR_ROOT: ${IPHONESIMULATOR_ROOT}\n"
"IOS_SDK_VERSION: ${IOS_SDK_VERSION}\n"
)
endif()

# iPhone root
set(
IPHONEOS_ROOT
"${XCODE_DEVELOPER_ROOT}/Platforms/iPhoneOS.platform/Developer"
)
if(NOT EXISTS "${IPHONEOS_ROOT}")
polly_fatal_error(
"IPHONEOS_ROOT not found (${IPHONEOS_ROOT})\n"
"XCODE_DEVELOPER_ROOT: ${XCODE_DEVELOPER_ROOT}\n"
)
endif()

# iPhone SDK root
set(IPHONEOS_SDK_ROOT "${IPHONEOS_ROOT}/SDKs/iPhoneOS${IOS_SDK_VERSION}.sdk")

if(NOT EXISTS ${IPHONEOS_SDK_ROOT})
hunter_fatal_error(
"IPHONEOS_SDK_ROOT not found (${IPHONEOS_SDK_ROOT})\n"
"IPHONEOS_ROOT: ${IPHONEOS_ROOT}\n"
"IOS_SDK_VERSION: ${IOS_SDK_VERSION}\n"
)
endif()

# support for hunter (github.com/ruslo/hunter)
set(HUNTER_CMAKE_GENERATOR Xcode)

0 comments on commit 25096a8

Please sign in to comment.