20cfe04535
We can use xcode-select -print-path to get the /Developer directory. This also removes the need for the "legacy" makespecs, which only differ from their non-legacy counterparts in the location of the Xcode developer directory. Change-Id: Ia9245033a4b82cc3933226bf998f07177b60871f Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
61 lines
2.1 KiB
Plaintext
61 lines
2.1 KiB
Plaintext
#
|
|
# Common build settings for all iOS configurations
|
|
#
|
|
# Depends on:
|
|
#
|
|
# QMAKE_XCODE_DEVELOPER_PATH - set in mkspecs/common/ios/versions.conf
|
|
# QMAKE_IOS_XCODE_VERSION - set in mkspecs/common/ios/versions.conf
|
|
# QMAKE_IOS_SDK_VERSION - set in mkspecs/common/ios/versions.conf
|
|
# QMAKE_IOSSIMULATOR_SDK_VERSION - set in mkspecs/common/ios/versions.conf
|
|
#
|
|
|
|
# iOS SDK device type
|
|
!*simulator*: QMAKE_IOS_DEVICE_TYPE = iPhoneOS
|
|
else {
|
|
QMAKE_IOS_DEVICE_TYPE = iPhoneSimulator
|
|
|
|
# Use simulator SDK version
|
|
QMAKE_IOS_SDK_VERSION = $$QMAKE_IOS_SIMULATOR_SDK_VERSION
|
|
QMAKE_IOS_SIMULATOR_SDK_VERSION =
|
|
}
|
|
|
|
# iOS platform /Developer path
|
|
QMAKE_IOS_DEV_PATH = $$QMAKE_XCODE_DEVELOPER_PATH/Platforms/$${QMAKE_IOS_DEVICE_TYPE}.platform/Developer
|
|
|
|
# iOS platform SDK path
|
|
QMAKE_IOS_SDK = $$QMAKE_IOS_DEV_PATH/SDKs/$${QMAKE_IOS_DEVICE_TYPE}$${QMAKE_IOS_SDK_VERSION}.sdk
|
|
QMAKE_IOS_DEV_PATH =
|
|
QMAKE_IOS_DEVICE_TYPE =
|
|
|
|
QMAKE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
|
|
QMAKE_CXXFLAGS += -isysroot $$QMAKE_IOS_SDK
|
|
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_IOS_SDK
|
|
QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_IOS_SDK
|
|
QMAKE_IOS_SDK =
|
|
|
|
# Basic iOS frameworks needed for any GUI app
|
|
QMAKE_LFLAGS += -framework Foundation -framework UIKit -framework QuartzCore -lz
|
|
|
|
# OpenGL ES1
|
|
QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
|
|
QMAKE_LIBDIR_OPENGL_ES1 =
|
|
QMAKE_LIBS_OPENGL_ES1 = -framework OpenGLES
|
|
|
|
# OpenGL ES2
|
|
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_IOS_SDK/System/Library/Frameworks/OpenGLES.framework/Headers
|
|
QMAKE_LIBDIR_OPENGL_ES2 =
|
|
QMAKE_LIBS_OPENGL_ES2 = -framework OpenGLES
|
|
|
|
# No desktop OpenGL
|
|
QMAKE_INCDIR_OPENGL =
|
|
QMAKE_LIBS_OPENGL =
|
|
|
|
# Compiler-specific flags
|
|
!*-g++* {
|
|
# Objective-C/C++ precompile flags
|
|
QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
|
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
|
|
QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
}
|