summaryrefslogtreecommitdiffstats
path: root/mkspecs/common/ios/qmake.conf
blob: ee3010f45119b379fa37289be696c67191359261 (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
#
# 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
#

QMAKE_XCODE_TOOLCHAIN_BIN_PATH = $$QMAKE_XCODE_DEVELOPER_PATH/Toolchains/XcodeDefault.xctoolchain/usr/bin

# iOS build tools
QMAKE_CC                = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/clang
QMAKE_CXX               = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/clang++
QMAKE_FIX_RPATH         = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/install_name_tool -id
QMAKE_AR                = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/ar cq
QMAKE_RANLIB            = $$QMAKE_XCODE_TOOLCHAIN_BIN_PATH/ranlib -s
QMAKE_LINK              = $$QMAKE_CXX
QMAKE_LINK_SHLIB        = $$QMAKE_CXX

# Check that compiler is valid
!exists($$QMAKE_CXX): error("The version of Xcode installed on this system does not include the clang compiler")

QMAKE_CFLAGS           += -isysroot $$QMAKE_IOS_SDK_PATH
QMAKE_CXXFLAGS         += -isysroot $$QMAKE_IOS_SDK_PATH
QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_IOS_SDK_PATH
QMAKE_LFLAGS           += -Wl,-syslibroot,$$QMAKE_IOS_SDK_PATH

# Basic iOS frameworks needed for any GUI app
QMAKE_LFLAGS           += -framework Foundation -framework UIKit -framework QuartzCore -lz

# No OpenGL ES1
QMAKE_INCDIR_OPENGL_ES1 =
QMAKE_LIBDIR_OPENGL_ES1 =
QMAKE_LIBS_OPENGL_ES1   =

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

# 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