source: trunk/src/qbase.pri@ 1056

Last change on this file since 1056 was 1050, checked in by Dmitry A. Kuminov, 14 years ago

Restore place of original VERSION definition (revert r385).

The reason is that VERSION is very dangerous: setting it causes all DLL
files to get the suffix comprised of the major version number extracted from
the VERSION's value. Since qt_targets.pri may be included everywhere,
it may have unexpected side effects (like it did for QML plugins since it is
included from qimportbase.pri).

File size: 7.3 KB
RevLine 
[846]1isEmpty(TARGET):error("You must set TARGET before include()'ing $${_FILE_}")
[2]2INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat
3isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700
4TEMPLATE = lib
[1050]5isEmpty(QT_MAJOR_VERSION) {
6 VERSION=4.7.3
7} else {
8 VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
9}
[2]10mac:!contains(QMAKE_EXT_C, .mm):QMAKE_EXT_C += .mm
11
12#load up the headers info
13CONFIG += qt_install_headers
14HEADERS_PRI = $$QT_BUILD_TREE/include/$$TARGET/headers.pri
[561]15include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
[2]16
17#version overriding
[104]18win32|os2 {
[2]19 #because libnetwork.pro could be qmake'd (qmade?) before libqcore.pro we
20 #need to override the version of libq* in all other libq*'s just to be
21 #sure the same version is used
22 VERSIONS_LIST = $$split(VERSION, ".")
23 QT_LIBS_OVERRIDE = $$member(VERSIONS_LIST, 0)
24 for(lib, $$list(qtcore qtgui qtnetwork qtxml qtopengl qtsql qt3support)) {
25 eval(QMAKE_$${upper($$lib)}_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE)
26 eval(QMAKE_$${upper($$lib)}D_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE)
27 }
28}
29
30#other
31DESTDIR = $$QMAKE_LIBDIR_QT
[60]32os2|win32:!wince*:DLLDESTDIR = $$[QT_INSTALL_PREFIX]/bin
[2]33
34CONFIG += qt warn_on depend_includepath
35CONFIG += qmake_cache target_qt
36CONFIG -= fix_output_dirs
37win32|mac:!macx-xcode:CONFIG += debug_and_release
[846]38linux*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
[2]39
40contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
41unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
42contains(QT_CONFIG, largefile):CONFIG += largefile
43
44#mac frameworks
45mac:!static:contains(QT_CONFIG, qt_framework) {
46 #QMAKE_FRAMEWORK_VERSION = 4.0
47 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
48 CONFIG(debug, debug|release) {
49 !build_pass:CONFIG += build_all
50 } else { #release
51 !debug_and_release|build_pass {
52 CONFIG -= qt_install_headers #no need to install these as well
53 FRAMEWORK_HEADERS.version = Versions
54 FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
55 FRAMEWORK_HEADERS.path = Headers
56 equals(TARGET, QtCore) {
57 #headers generated by configure
58 !contains(FRAMEWORK_HEADERS.files, .*/qconfig.h) {
59 FRAMEWORK_HEADERS.files *= $$QT_BUILD_TREE/src/corelib/global/qconfig.h
60 }
61 }
62 }
63 QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
64 }
65}
66
67mac {
68 CONFIG += explicitlib
69 macx-g++ {
70 QMAKE_CFLAGS += -fconstant-cfstrings
71 QMAKE_CXXFLAGS += -fconstant-cfstrings
72 }
73}
74
[60]75win32:!shared|os2:!shared:CONFIG += static
[2]76
77win32-borland {
78 mng:QMAKE_CFLAGS_WARN_ON += -w-par
79 mng:QMAKE_CXXFLAGS_WARN_ON += -w-par
80 # Keep the size of the .tds file for the Qt library smaller than
81 # 34 Mbytes to avoid linking problems
82 QMAKE_CFLAGS_DEBUG += -vi -y-
83 QMAKE_CXXFLAGS_DEBUG += -vi -y-
84}
85
[60]86win32|os2 {
[2]87 INCLUDEPATH += tmp
88 !static: DEFINES+=QT_MAKEDLL
89}
[561]90symbian {
91 shared {
92 DEFINES+=QT_MAKEDLL
93 TARGET.CAPABILITY = All -Tcb
94
[651]95 # When building without autotests, DEF files are used by default.
96 # This is to maintain binary compatibility with previous releases.
97 # To explicitly disable DEF files usage, eg. when lots of code churn is
98 # going on, and functions may be added and removed before shipping,
99 # configure with -no-usedeffiles
100 # WARNING - disabling DEF files *will* break BC with previous released versions
101 # of Qt, and the only compatibility will be between this build of Qt and anything
102 # built in this exact environment. *Never* use this when building a version
103 # for release.
104 contains(CONFIG, def_files) {
[846]105 DEF_FILE=../s60installs
[561]106 }
107 }
108 load(armcc_warnings)
[769]109
110 # workaround for the fact that some of our required includes in Symbian^3
111 # now depend upon files in epoc32/include/platform
112 INCLUDEPATH += $$OS_LAYER_SYSTEMINCLUDE
[561]113}
[2]114win32-borland:INCLUDEPATH += kernel
115
116aix-g++* {
117 QMAKE_CFLAGS += -mminimal-toc
118 QMAKE_CXXFLAGS += -mminimal-toc
119}
120
121embedded {
122 EMBEDDED_H = $$EMBEDDED_CPP
123}
124
125DEPENDPATH += ;$$NETWORK_H;$$KERNEL_H;$$WIDGETS_H;$$SQL_H;$$TABLE_H;$$DIALOGS_H;
126DEPENDPATH += $$ICONVIEW_H;$$OPENGL_H;$$THREAD_H;$$TOOLS_H;$$CODECS_H;
127DEPENDPATH += $$WORKSPACE_H;$$XML_H;$$STYLES_H;$$COMPAT_H
128embedded:DEPENDPATH += ;$$EMBEDDED_H
129
130!static:PRL_EXPORT_DEFINES += QT_SHARED
131
132#install directives
133include(qt_install.pri)
134
[561]135unix:!symbian {
[2]136 CONFIG += create_libtool create_pc explicitlib
137 QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS]
138 QMAKE_PRL_LIBDIR = $$[QT_INSTALL_LIBS]
139 QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]
140 QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET
141 QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS]
142 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
143 include_replace.match = $$QMAKE_INCDIR_QT
144 include_replace.replace = $$[QT_INSTALL_HEADERS]
145 lib_replace.match = $$QMAKE_LIBDIR_QT
146 lib_replace.replace = $$[QT_INSTALL_LIBS]
147 prefix_replace.match = $$QT_BUILD_TREE
148 prefix_replace.replace = $$[QT_INSTALL_PREFIX]
149 QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
150 QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
151 QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace prefix_replace
152}
153
154contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
[561]155DEFINES *= QT_NO_CAST_TO_ASCII QT_ASCII_CAST_WARNINGS
[2]156contains(QT_CONFIG, qt3support):DEFINES *= QT3_SUPPORT
157DEFINES *= QT_MOC_COMPAT #we don't need warnings from calling moc code in our generated code
[846]158DEFINES *= QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
[2]159
160TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
[158]161!isEmpty(TARGET_SHORT):TARGET_SHORT = $$qtLibraryTarget($$TARGET_SHORT$$QT_LIBINFIX) #do this towards the end
[2]162
[846]163qtPrepareTool(QMAKE_LUPDATE, lupdate)
164qtPrepareTool(QMAKE_LRELEASE, lrelease)
165
[2]166moc_dir.name = moc_location
167moc_dir.variable = QMAKE_MOC
168
169uic_dir.name = uic_location
170uic_dir.variable = QMAKE_UIC
171
[846]172rcc_dir.name = rcc_location
173rcc_dir.variable = QMAKE_RCC
[2]174
[846]175lupdate_dir.name = lupdate_location
176lupdate_dir.variable = QMAKE_LUPDATE
177
178lrelease_dir.name = lrelease_location
179lrelease_dir.variable = QMAKE_LRELEASE
180
181QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir rcc_dir lupdate_dir lrelease_dir
182
[1050]183include(qt_targets.pri)
184
[2]185win32:DEFINES+=_USE_MATH_DEFINES
[846]186
187symbian {
188 # Make partial upgrade SIS file for all dll's except webkit and s60main
189 !contains(TARGET.UID3, 0x200267C2):!contains(TARGET.UID3, 0xE00267C2):!contains(TARGET.UID3, 0x2001E61F):!contains(TARGET.UID3, 0xE001E61F) {
190 # Partial upgrade SIS file
191 vendorinfo = \
192 "; Localised Vendor name" \
193 "%{\"Nokia\"}" \
194 " " \
195 "; Unique Vendor name" \
196 ":\"Nokia, Qt\"" \
197 " "
198 isEmpty(QT_LIBINFIX): PARTIAL_UPGRADE_UID = 0x2001E61C
199 else: PARTIAL_UPGRADE_UID = 0xE001E61C
200
201 pu_header = "; Partial upgrade package for testing $${TARGET} changes without reinstalling everything" \
202 "$${LITERAL_HASH}{\"$${TARGET}\"}, ($$PARTIAL_UPGRADE_UID), $${QT_MAJOR_VERSION},$${QT_MINOR_VERSION},$${QT_PATCH_VERSION}, TYPE=PU"
203 partial_upgrade.pkg_prerules = pu_header vendorinfo
204 partial_upgrade.sources = $$QMAKE_LIBDIR_QT/$${TARGET}.dll
205 partial_upgrade.path = c:/sys/bin
206 DEPLOYMENT += partial_upgrade
207 }
208}
Note: See TracBrowser for help on using the repository browser.