author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 19 Feb 2010 23:40:16 +0200 (2010-02-19) | |
branch | RCL_3 |
changeset 4 | 3b1da2848fc7 |
parent 3 | 41300fa6a67c |
child 5 | d3bac044e0f0 |
permissions | -rw-r--r-- |
0 | 1 |
isEmpty(TARGET):error(You must set TARGET before include()'ing $${_FILE_}) |
2 |
INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat |
|
3 |
!isEmpty(RCC_DIR): INCLUDEPATH += $$RCC_DIR |
|
4 |
isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 |
|
5 |
TEMPLATE = lib |
|
6 |
isEmpty(QT_MAJOR_VERSION) { |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
7 |
VERSION=4.6.2 |
0 | 8 |
} else { |
9 |
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} |
|
10 |
} |
|
11 |
mac:!contains(QMAKE_EXT_C, .mm):QMAKE_EXT_C += .mm |
|
12 |
||
13 |
#load up the headers info |
|
14 |
CONFIG += qt_install_headers |
|
15 |
HEADERS_PRI = $$QT_BUILD_TREE/include/$$TARGET/headers.pri |
|
16 |
include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI) |
|
17 |
||
18 |
#version overriding |
|
19 |
win32 { |
|
20 |
#because libnetwork.pro could be qmake'd (qmade?) before libqcore.pro we |
|
21 |
#need to override the version of libq* in all other libq*'s just to be |
|
22 |
#sure the same version is used |
|
23 |
VERSIONS_LIST = $$split(VERSION, ".") |
|
24 |
QT_LIBS_OVERRIDE = $$member(VERSIONS_LIST, 0) |
|
25 |
for(lib, $$list(qtcore qtgui qtnetwork qtxml qtopengl qtsql qt3support)) { |
|
26 |
eval(QMAKE_$${upper($$lib)}_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) |
|
27 |
eval(QMAKE_$${upper($$lib)}D_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) |
|
28 |
} |
|
29 |
} |
|
30 |
||
31 |
#other |
|
32 |
DESTDIR = $$QMAKE_LIBDIR_QT |
|
33 |
win32:!wince*:DLLDESTDIR = $$[QT_INSTALL_PREFIX]/bin |
|
34 |
||
35 |
CONFIG += qt warn_on depend_includepath |
|
36 |
CONFIG += qmake_cache target_qt |
|
37 |
CONFIG -= fix_output_dirs |
|
38 |
win32|mac:!macx-xcode:CONFIG += debug_and_release |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
39 |
linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF |
0 | 40 |
|
41 |
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols |
|
42 |
unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions |
|
43 |
contains(QT_CONFIG, largefile):CONFIG += largefile |
|
44 |
||
45 |
#mac frameworks |
|
46 |
mac:!static:contains(QT_CONFIG, qt_framework) { |
|
47 |
#QMAKE_FRAMEWORK_VERSION = 4.0 |
|
48 |
CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework |
|
49 |
CONFIG(debug, debug|release) { |
|
50 |
!build_pass:CONFIG += build_all |
|
51 |
} else { #release |
|
52 |
!debug_and_release|build_pass { |
|
53 |
CONFIG -= qt_install_headers #no need to install these as well |
|
54 |
FRAMEWORK_HEADERS.version = Versions |
|
55 |
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES |
|
56 |
FRAMEWORK_HEADERS.path = Headers |
|
57 |
equals(TARGET, QtCore) { |
|
58 |
#headers generated by configure |
|
59 |
!contains(FRAMEWORK_HEADERS.files, .*/qconfig.h) { |
|
60 |
FRAMEWORK_HEADERS.files *= $$QT_BUILD_TREE/src/corelib/global/qconfig.h |
|
61 |
} |
|
62 |
} |
|
63 |
} |
|
64 |
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS |
|
65 |
} |
|
66 |
} |
|
67 |
||
68 |
mac { |
|
69 |
CONFIG += explicitlib |
|
70 |
macx-g++ { |
|
71 |
QMAKE_CFLAGS += -fconstant-cfstrings |
|
72 |
QMAKE_CXXFLAGS += -fconstant-cfstrings |
|
73 |
} |
|
74 |
} |
|
75 |
||
76 |
win32:!shared:CONFIG += static |
|
77 |
||
78 |
win32-borland { |
|
79 |
mng:QMAKE_CFLAGS_WARN_ON += -w-par |
|
80 |
mng:QMAKE_CXXFLAGS_WARN_ON += -w-par |
|
81 |
# Keep the size of the .tds file for the Qt library smaller than |
|
82 |
# 34 Mbytes to avoid linking problems |
|
83 |
QMAKE_CFLAGS_DEBUG += -vi -y- |
|
84 |
QMAKE_CXXFLAGS_DEBUG += -vi -y- |
|
85 |
} |
|
86 |
||
87 |
win32 { |
|
88 |
CONFIG += zlib |
|
89 |
INCLUDEPATH += tmp |
|
90 |
!static: DEFINES+=QT_MAKEDLL |
|
91 |
} |
|
92 |
symbian { |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
93 |
CONFIG += headerexport symbian_no_export_sqlite |
0 | 94 |
shared { |
95 |
DEFINES+=QT_MAKEDLL |
|
96 |
TARGET.CAPABILITY = All -Tcb |
|
97 |
||
98 |
defBlock = \ |
|
99 |
"$${LITERAL_HASH}ifdef WINSCW" \ |
|
100 |
"DEFFILE ../s60installs/bwins/$${TARGET}.def" \ |
|
101 |
"$${LITERAL_HASH}elif defined EABI" \ |
|
102 |
"DEFFILE ../s60installs/eabi/$${TARGET}.def" \ |
|
103 |
"$${LITERAL_HASH}endif" |
|
104 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
105 |
contains(QT_CONFIG, private_tests) { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
106 |
#When building autotest configuration, there are extra exports from |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
107 |
#the Qt DLLs, which we don't want in the frozen DEF files. |
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
108 |
MMP_RULES += EXPORTUNFROZEN |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
109 |
} else { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
110 |
#When building without autotests, DEF files are used by default. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
111 |
#This is to maintain binary compatibility with previous releases. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
112 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
113 |
#with defBlock enabled, removed exported symbols are treated as errors |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
114 |
#and there is binary compatibility between successive builds. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
115 |
#with defBlock disabled, binary compatibility is broken every time you build |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
116 |
MMP_RULES += defBlock |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
117 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
118 |
#with EXPORTUNFROZEN enabled, new exports are included in the dll without |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
119 |
#needing to run abld freeze, however binary compatibility is only maintained |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
120 |
#for symbols that are frozen (and only if defBlock is also enabled) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
121 |
#the downside of EXPORTUNFROZEN is that the linker gets run twice |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
122 |
#MMP_RULES += EXPORTUNFROZEN |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
123 |
} |
0 | 124 |
} |
125 |
load(armcc_warnings) |
|
126 |
} |
|
127 |
win32-borland:INCLUDEPATH += kernel |
|
128 |
||
129 |
aix-g++* { |
|
130 |
QMAKE_CFLAGS += -mminimal-toc |
|
131 |
QMAKE_CXXFLAGS += -mminimal-toc |
|
132 |
} |
|
133 |
||
134 |
embedded { |
|
135 |
EMBEDDED_H = $$EMBEDDED_CPP |
|
136 |
} |
|
137 |
||
138 |
DEPENDPATH += ;$$NETWORK_H;$$KERNEL_H;$$WIDGETS_H;$$SQL_H;$$TABLE_H;$$DIALOGS_H; |
|
139 |
DEPENDPATH += $$ICONVIEW_H;$$OPENGL_H;$$THREAD_H;$$TOOLS_H;$$CODECS_H; |
|
140 |
DEPENDPATH += $$WORKSPACE_H;$$XML_H;$$STYLES_H;$$COMPAT_H |
|
141 |
embedded:DEPENDPATH += ;$$EMBEDDED_H |
|
142 |
||
143 |
!static:PRL_EXPORT_DEFINES += QT_SHARED |
|
144 |
||
145 |
#install directives |
|
146 |
include(qt_install.pri) |
|
147 |
||
148 |
unix:!symbian { |
|
149 |
CONFIG += create_libtool create_pc explicitlib |
|
150 |
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS] |
|
151 |
QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS] |
|
152 |
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS] |
|
153 |
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET |
|
154 |
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] |
|
155 |
QMAKE_PKGCONFIG_DESTDIR = pkgconfig |
|
156 |
include_replace.match = $$QMAKE_INCDIR_QT |
|
157 |
include_replace.replace = $$[QT_INSTALL_HEADERS] |
|
158 |
lib_replace.match = $$QMAKE_LIBDIR_QT |
|
159 |
lib_replace.replace = $$[QT_INSTALL_LIBS] |
|
160 |
prefix_replace.match = $$QT_BUILD_TREE |
|
161 |
prefix_replace.replace = $$[QT_INSTALL_PREFIX] |
|
162 |
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace |
|
163 |
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace |
|
164 |
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace |
|
165 |
} |
|
166 |
||
167 |
contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE |
|
168 |
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS |
|
169 |
contains(QT_CONFIG, qt3support):DEFINES *= QT3_SUPPORT |
|
170 |
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code |
|
171 |
||
172 |
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end |
|
173 |
||
174 |
moc_dir.name = moc_location |
|
175 |
moc_dir.variable = QMAKE_MOC |
|
176 |
||
177 |
uic_dir.name = uic_location |
|
178 |
uic_dir.variable = QMAKE_UIC |
|
179 |
||
180 |
QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir |
|
181 |
||
182 |
include(qt_targets.pri) |
|
183 |
||
184 |
win32:DEFINES+=_USE_MATH_DEFINES |