| # |
| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to you under the Apache License, Version |
| # 2.0 (the "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| |
| SET (TARGET_OS iPhoneOS) |
| SET (TARGET_ARCH ARMV7S) |
| |
| INCLUDE(CMakeForceCompiler) |
| CMAKE_FORCE_C_COMPILER(clang clang) |
| CMAKE_FORCE_CXX_COMPILER(clang++ clang) |
| |
| SET (CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") |
| |
| IF(NOT SDK_VERSION) |
| SET (SDK_VERSION "7.1" CACHE STRING "iOS SDK-Version" FORCE) |
| MESSAGE(STATUS " WARNING: The SDK_VERSION was set to default to ${SDK_VERSION}, you can specify an other SDK by using \"-DSDK_VERSION=7.1\" or by using the CMake GUI") |
| ELSE() |
| SET (SDK_VERSION "${SDK_VERSION}" CACHE STRING "iOS SDK-Version" FORCE) |
| ENDIF() |
| |
| SET (DEVELOPER_ROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" CACHE STRING "Developer Root Path" FORCE) |
| SET (SDK_ROOT "${DEVELOPER_ROOT}/SDKs/iPhoneOS${SDK_VERSION}.sdk" CACHE STRING "SDK Root Path" FORCE) |
| |
| SET (CMAKE_OSX_SYSROOT "${SDK_ROOT}") |
| SET (CMAKE_OSX_DEPLOYMENT_TARGET "") |
| SET (CMAKE_OSX_ARCHITECTURES "armv7s") |
| |
| SET (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") |
| |
| SET (CMAKE_C_FLAGS_DEBUG "-ggdb -Wall -D_DEBUG") |
| SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") |
| |
| SET (CMAKE_C_FLAGS_RELEASE "-Wall -O3 -DNDEBUG") |
| SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") |
| |
| ADD_DEFINITIONS ("-DTARGET_OS=iPhoneOS") |
| ADD_DEFINITIONS ("-DTARGET_ARCH=ARMV7S") |
| ADD_DEFINITIONS ("-DOS_IPHONEOS") |
| ADD_DEFINITIONS ("-DARCH_ARMV7") |
| |
| #disable GTEST ARM Targets |
| SET(CONFIG_BUILD_TESTS FALSE) |