author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 10:37:55 +0300 | |
changeset 33 | 3e2da88830cd |
parent 30 | 5dc02b23752f |
child 37 | 758a864f9613 |
permissions | -rw-r--r-- |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
1 |
isEmpty(TARGET):error("You must set TARGET before include()'ing $${_FILE_}") |
0 | 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) { |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
7 |
VERSION=4.7.0 |
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 |
INCLUDEPATH += tmp |
|
89 |
!static: DEFINES+=QT_MAKEDLL |
|
90 |
} |
|
91 |
symbian { |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
92 |
DEFINES += QT_QCHAR_CONSTRUCTOR |
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
93 |
# load the environment specific feature definitions |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
94 |
exists($${EPOCROOT}epoc32/tools/qt/mkspecs/features/environment.prf) { |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
95 |
load($${EPOCROOT}epoc32/tools/qt/mkspecs/features/environment.prf) |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
96 |
} |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
97 |
|
0 | 98 |
shared { |
99 |
DEFINES+=QT_MAKEDLL |
|
100 |
TARGET.CAPABILITY = All -Tcb |
|
101 |
||
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
102 |
# When building without autotests, DEF files are used by default. |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
103 |
# This is to maintain binary compatibility with previous releases. |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
104 |
# To explicitly disable DEF files usage, eg. when lots of code churn is |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
105 |
# going on, and functions may be added and removed before shipping, |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
106 |
# configure with -no-usedeffiles |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
107 |
# WARNING - disabling DEF files *will* break BC with previous released versions |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
108 |
# of Qt, and the only compatibility will be between this build of Qt and anything |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
109 |
# built in this exact environment. *Never* use this when building a version |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
110 |
# for release. |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
111 |
contains(CONFIG, def_files) { |
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
112 |
DEF_FILE=../s60installs |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
113 |
} |
0 | 114 |
} |
115 |
load(armcc_warnings) |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
116 |
|
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
117 |
# workaround for the fact that some of our required includes in Symbian^3 |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
118 |
# now depend upon files in epoc32/include/platform |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
119 |
INCLUDEPATH += $$OS_LAYER_SYSTEMINCLUDE |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
120 |
# All relevant files are marked as SMP safe for the Symbian port |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
121 |
MMP_RULES*=SMPSAFE |
0 | 122 |
} |
123 |
win32-borland:INCLUDEPATH += kernel |
|
124 |
||
125 |
aix-g++* { |
|
126 |
QMAKE_CFLAGS += -mminimal-toc |
|
127 |
QMAKE_CXXFLAGS += -mminimal-toc |
|
128 |
} |
|
129 |
||
130 |
embedded { |
|
131 |
EMBEDDED_H = $$EMBEDDED_CPP |
|
132 |
} |
|
133 |
||
134 |
DEPENDPATH += ;$$NETWORK_H;$$KERNEL_H;$$WIDGETS_H;$$SQL_H;$$TABLE_H;$$DIALOGS_H; |
|
135 |
DEPENDPATH += $$ICONVIEW_H;$$OPENGL_H;$$THREAD_H;$$TOOLS_H;$$CODECS_H; |
|
136 |
DEPENDPATH += $$WORKSPACE_H;$$XML_H;$$STYLES_H;$$COMPAT_H |
|
137 |
embedded:DEPENDPATH += ;$$EMBEDDED_H |
|
138 |
||
139 |
!static:PRL_EXPORT_DEFINES += QT_SHARED |
|
140 |
||
141 |
#install directives |
|
142 |
include(qt_install.pri) |
|
143 |
||
144 |
unix:!symbian { |
|
145 |
CONFIG += create_libtool create_pc explicitlib |
|
146 |
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS] |
|
147 |
QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS] |
|
148 |
QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS] |
|
149 |
QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET |
|
150 |
QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] |
|
151 |
QMAKE_PKGCONFIG_DESTDIR = pkgconfig |
|
152 |
include_replace.match = $$QMAKE_INCDIR_QT |
|
153 |
include_replace.replace = $$[QT_INSTALL_HEADERS] |
|
154 |
lib_replace.match = $$QMAKE_LIBDIR_QT |
|
155 |
lib_replace.replace = $$[QT_INSTALL_LIBS] |
|
156 |
prefix_replace.match = $$QT_BUILD_TREE |
|
157 |
prefix_replace.replace = $$[QT_INSTALL_PREFIX] |
|
158 |
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace |
|
159 |
QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace |
|
160 |
QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace |
|
161 |
} |
|
162 |
||
163 |
contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE |
|
164 |
DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS |
|
165 |
contains(QT_CONFIG, qt3support):DEFINES *= QT3_SUPPORT |
|
166 |
DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
167 |
DEFINES *= QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION |
0 | 168 |
|
169 |
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end |
|
170 |
||
171 |
moc_dir.name = moc_location |
|
172 |
moc_dir.variable = QMAKE_MOC |
|
173 |
||
174 |
uic_dir.name = uic_location |
|
175 |
uic_dir.variable = QMAKE_UIC |
|
176 |
||
177 |
QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir |
|
178 |
||
179 |
include(qt_targets.pri) |
|
180 |
||
181 |
win32:DEFINES+=_USE_MATH_DEFINES |