source: trunk/src/qbase.pri@ 603

Last change on this file since 603 was 594, checked in by Dmitry A. Kuminov, 15 years ago

qmake: Fixed: On debug_and_release platforms, qrc output files were searched in the wrong output directory while determining the list of include dependencies which resulted into a compile rule for the qrc in the right output directory file even if this file is actually included from the main source file which eventually resulted in duplicate symbols when linking [vendor bug].

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