blob: 3201053ff3678832acb9cc96821c139a32afaec9 (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)
# our own version variables
VERSION_MAJOR = 1
VERSION_MINOR = 0
# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}
# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost
CONFIG(release, debug|release) {
DEFINES += RELEASE _RELEASE NDEBUG
CONFIG_NAME = release
} else {
DEFINES += DEBUG _DEBUG
CONFIG_NAME = debug
}
# turn off maps downloader engine for desktops in release and production
!iphone* {
CONFIG(release, debug|release)|CONFIG(production) {
CONFIG += no_downloader
DEFINES += NO_DOWNLOADER
}
}
BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET
DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH
LIBS += -L$$BINARIES_PATH
# By default, do not include base QT classes in any project.
QT -= core gui
# Turn on compiler warnings.
CONFIG += warn_on
# Libraries' dependencies hack.
win32-msvc*|symbian {
LIB_EXT = .lib
LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
LIB_EXT = .a
LIB_PREFIX = lib
}
# Add libraries' dependencies.
for(project, DEPENDENCIES) {
PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
LIBS += -l$$project
}
#INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/
# Windows-specific options for all projects
win32 {
DEFINES += _WIN32_WINNT=0x0501
DEFINES += WINVER=0x0501
DEFINES += _WIN32_IE=0x0501
DEFINES += WIN32_LEAN_AND_MEAN=1
DEFINES += NTDDI_VERSION=0x05010000
}
win32-msvc* {
QMAKE_CLEAN += *.user
DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast
QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb /Zi /fp:fast
QMAKE_CXXFLAGS_RELEASE -= /O2
# don't set -GL - bug in msvc2008
QMAKE_CXXFLAGS_RELEASE += /Ox /GF
# don't set /LTCG - bug in msvc2008
QMAKE_LFLAGS_RELEASE += /MACHINE:X86 /OPT:REF
CONFIG(release, debug|release) {
DEFINES += _SECURE_SCL=0
}
}
win32-msvc2010 {
DEFINES += _HAS_CPP0X=0 # disable tr1 and c++0x features to avoid build errors
QMAKE_CFLAGS_RELEASE += /GL
QMAKE_CXXFLAGS_RELEASE += /GL
QMAKE_LFLAGS_RELEASE += /LTCG
QMAKE_LIB += /LTCG
}
unix|win32-g++ {
QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing -Wconversion -Wno-unused-parameter
# experimental
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE += -O3
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_CFLAGS_RELEASE *= -ffast-math
QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}
linux-g++* {
QMAKE_CC = gcc-4.5
QMAKE_CXX = g++-4.5
QMAKE_CFLAGS_RELEASE += -flto
QMAKE_CXXFLAGS_RELEASE += -flto
QMAKE_LFLAGS_RELEASE += -flto
}
win32-g++ {
QMAKE_CFLAGS *= -Wextra
QMAKE_CXXFLAGS *= -Wextra
}
macx-* {
# minimum supported Mac OS X version
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
QMAKE_CFLAGS *= -mmacosx-version-min=10.6
QMAKE_CXXFLAGS *= -mmacosx-version-min=10.6
# replace 10.5 with 10.6
QMAKE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
QMAKE_CXXFLAGS_X86_64 -= -mmacosx-version-min=10.5
QMAKE_CFLAGS_X86_64 += -mmacosx-version-min=10.6 # CXX is made based on CFLAGS
QMAKE_OBJECTIVE_CFLAGS_X86_64 -= -mmacosx-version-min=10.5
QMAKE_OBJECTIVE_CFLAGS_X86_64 += -mmacosx-version-min=10.6
QMAKE_LFLAGS_X86_64 -= -mmacosx-version-min=10.5
QMAKE_LFLAGS_X86_64 += -mmacosx-version-min=10.6
}
CONFIG(production) {
DEFINES += OMIM_PRODUCTION
} else {
# enable debugging information for non-production release builds
unix|win32-g++ {
QMAKE_CFLAGS_RELEASE += -g
QMAKE_CXXFLAGS_RELEASE += -g
} win32-msvc* {
QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG
}
}
|