1 ###################################################################### |
|
2 # |
|
3 # Mobility API project - common QMake settings |
|
4 # |
|
5 ###################################################################### |
|
6 |
|
7 |
|
8 CONFIG(debug, debug|release) { |
|
9 WAS_IN_DEBUG=debug |
|
10 } else { |
|
11 WAS_IN_DEBUG=release |
|
12 } |
|
13 |
|
14 include(staticconfig.pri) |
|
15 |
|
16 symbian:contains(symbian_symbols_unfrozen,1) { |
|
17 #see configure.bat for details |
|
18 MMP_RULES+="EXPORTUNFROZEN" |
|
19 } |
|
20 |
|
21 mac { |
|
22 contains(QT_CONFIG, qt_framework):contains(TEMPLATE, lib) { |
|
23 #MacOSX always builds debug and release libs when using mac framework |
|
24 CONFIG+=$$WAS_IN_DEBUG |
|
25 CONFIG += debug_and_release build_all |
|
26 } else { |
|
27 !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) { |
|
28 CONFIG -= debug_and_release debug release |
|
29 contains(QT_CONFIG,debug): CONFIG+=debug |
|
30 contains(QT_CONFIG,release): CONFIG+=release |
|
31 } |
|
32 } |
|
33 } |
|
34 |
|
35 #In Windows we want to build libraries in debug and release mode if the user |
|
36 #didn't select a version - if Qt is build in debug_and_release |
|
37 #this avoids problems for third party as qmake build debug by default |
|
38 #If mobility selected debug_and_release but Qt only supports |
|
39 #one version but not the other we slently disable the impossible combination |
|
40 win32:contains(CONFIG_WIN32,build_all) { |
|
41 contains(QT_CONFIG,debug):contains(QT_CONFIG,release) { |
|
42 contains(TEMPLATE,.*lib):!plugin { |
|
43 CONFIG += $$WAS_IN_DEBUG |
|
44 CONFIG += debug_and_release build_all |
|
45 } |
|
46 } else { |
|
47 CONFIG -= debug_and_release debug release |
|
48 contains(QT_CONFIG,debug): CONFIG+=debug |
|
49 contains(QT_CONFIG,release): CONFIG+=release |
|
50 } |
|
51 } |
|
52 |
|
53 # Helper function. This should move to a .prf file |
|
54 defineReplace(mobilityDeployFilename) { |
|
55 unset(MOBILITY_DEPLOY_NAME) |
|
56 MOBILITY_DEPLOY_NAME = $$1 |
|
57 CONFIG(debug, debug|release): { |
|
58 mac:RET = $$member(MOBILITY_DEPLOY_NAME, 0)_debug |
|
59 else:win32:RET = $$member(MOBILITY_DEPLOY_NAME, 0)d |
|
60 } |
|
61 isEmpty(RET):RET = $$MOBILITY_DEPLOY_NAME |
|
62 return($$RET) |
|
63 } |
|
64 |
|
65 # Make sure this goes everywhere we need it |
|
66 symbian: load(data_caging_paths) |
|
67 |
|
68 |
|
69 # Figure out the root of where stuff should go (this could be done via configure) |
|
70 OUTPUT_DIR = $$QT_MOBILITY_BUILD_TREE |
|
71 SOURCE_DIR = $$PWD |
|
72 |
|
73 CONFIG(debug, debug|release) { |
|
74 SUBDIRPART=Debug |
|
75 } else { |
|
76 SUBDIRPART=Release |
|
77 } |
|
78 |
|
79 contains(QT_CONFIG, reduce_exports):CONFIG+=hide_symbols |
|
80 |
|
81 #export more symbols if we build the unit tests |
|
82 contains(build_unit_tests, yes):DEFINES+=QTM_BUILD_UNITTESTS |
|
83 |
|
84 #test whether we have a unit test |
|
85 !testcase { |
|
86 OBJECTS_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET |
|
87 !plugin { |
|
88 contains(TEMPLATE,.*lib) { |
|
89 DESTDIR = $$OUTPUT_DIR/lib |
|
90 symbian:defFilePath=../s60installs |
|
91 # VERSION = 1.0.2 |
|
92 } else { |
|
93 DESTDIR = $$OUTPUT_DIR/bin |
|
94 } |
|
95 } else { |
|
96 testplugin { |
|
97 DESTDIR = $$OUTPUT_DIR/build/tests/bin/plugins/$$PLUGIN_TYPE |
|
98 } else { |
|
99 #check that plugin_type is set or warn otherwise |
|
100 isEmpty(PLUGIN_TYPE):message(PLUGIN_TYPE not specified - install rule may not work) |
|
101 target.path=$${QT_MOBILITY_PLUGINS}/$${PLUGIN_TYPE} |
|
102 INSTALLS += target |
|
103 } |
|
104 } |
|
105 |
|
106 MOC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/moc |
|
107 RCC_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/rcc |
|
108 UI_DIR = $$OUTPUT_DIR/build/$$SUBDIRPART/$$TARGET/ui |
|
109 QMAKE_RPATHDIR += $$QT_MOBILITY_LIB |
|
110 } else { |
|
111 # Unit test code (no plugins! test plugins are just normal plugins installed elsewhere) |
|
112 QT *= testlib |
|
113 CONFIG += console |
|
114 CONFIG -= app_bundle |
|
115 OBJECTS_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET |
|
116 DESTDIR = $$OUTPUT_DIR/build/tests/bin |
|
117 MOC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/moc |
|
118 RCC_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/rcc |
|
119 UI_DIR = $$OUTPUT_DIR/build/tests/$$SUBDIRPART/$$TARGET/ui |
|
120 QMAKE_RPATHDIR += $$OUTPUT_DIR/lib |
|
121 } |
|
122 |
|
123 contains(TEMPLATE,.*lib):DEFINES += QT_SHARED |
|
124 |
|
125 maemo6 { |
|
126 DEFINES+= Q_WS_MAEMO_6 |
|
127 contains(TEMPLATE,.*app.*): QMAKE_LIB_FLAGS+= -Wl,-rpath-link $$[QT_INSTALL_LIBS] |
|
128 QMAKE_LIB_FLAGS+= -Wl,-rpath-link $$[QT_INSTALL_LIBS] |
|
129 QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS] |
|
130 } |
|
131 maemo5 { |
|
132 DEFINES+= Q_WS_MAEMO_5 |
|
133 } |
|
134 |
|
135 wince* { |
|
136 ### Bearer Management |
|
137 BEARERLIB.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtBearer).dll |
|
138 BEARERLIB.path = . |
|
139 DEPLOYMENT += BEARERLIB |
|
140 |
|
141 ### Contacts |
|
142 # Main library |
|
143 CONTACTS_DEPLOYMENT.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtContacts).dll |
|
144 CONTACTS_DEPLOYMENT.path = /Windows |
|
145 |
|
146 # Plugins |
|
147 CONTACTS_PLUGINS_DEPLOYMENT.sources = $$OUTPUT_DIR/plugins/contacts/*.dll |
|
148 CONTACTS_PLUGINS_DEPLOYMENT.path = plugins/contacts |
|
149 DEPLOYMENT += CONTACTS_DEPLOYMENT CONTACTS_PLUGINS_DEPLOYMENT |
|
150 |
|
151 ### Service Framework |
|
152 SFW_DEPLOYMENT.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtServiceFramework).dll |
|
153 SFW_DEPLOYMENT.path = . |
|
154 DEPLOYMENT += SFW_DEPLOYMENT |
|
155 |
|
156 ### Location |
|
157 LOCATION.sources = $$OUTPUT_DIR/lib/$$mobilityDeployFilename(QtLocation).dll |
|
158 LOCATION.path = . |
|
159 DEPLOYMENT += LOCATION |
|
160 } |
|
161 |
|
162 symbian { |
|
163 #For some reason the default include path doesn't include MOC_DIR on symbian |
|
164 INCLUDEPATH += $$MOC_DIR |
|
165 |
|
166 #This is supposed to be defined in symbian_os.hrh |
|
167 DEFINES += SYMBIAN_EMULATOR_SUPPORTS_PERPROCESS_WSD |
|
168 } |
|
169 |
|
170 # Add the output dirs to the link path too |
|
171 mac:contains(QT_CONFIG,qt_framework) { |
|
172 #add framework option |
|
173 ##contains(TEMPLATE, app)|contains(CONFIG,plugin):LIBS+=-F$$OUTPUT_DIR/lib |
|
174 LIBS+=-F$$OUTPUT_DIR/lib |
|
175 } |
|
176 LIBS += -L$$OUTPUT_DIR/lib |
|
177 |
|
178 |
|
179 DEPENDPATH += . $$SOURCE_DIR |
|
180 INCLUDEPATH += $$SOURCE_DIR/src/global |
|
181 |
|
182 !symbian:!wince*:DEFINES += QTM_PLUGIN_PATH=\\\"$$replace(QT_MOBILITY_PLUGINS, \\\\, /)\\\" |
|