summaryrefslogtreecommitdiffstats
path: root/mkspecs/common/ios/qmake.conf
blob: 8ee2575fb4cf5e9d09b1e1fce3c26e4913200a63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Common build settings for all iOS configurations
#
# Depends on:
#
#   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 =
}

!lessThan(QMAKE_IOS_XCODE_VERSION, "4.3") {
    # Xcode 4.3+ is stored in /Applications
    QMAKE_IOS_XCODE_PATH = /Applications/Xcode.app/Contents
} else: QMAKE_IOS_XCODE_PATH =

# iOS platform /Developer path
QMAKE_IOS_DEV_PATH      = $$QMAKE_IOS_XCODE_PATH/Developer/Platforms/$${QMAKE_IOS_DEVICE_TYPE}.platform/Developer
QMAKE_IOS_XCODE_PATH    =

# 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       =
QMAKE_LIBS_OPENGL_QT    =

# 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
}