23
|
1 |
# config.pri specifies the configure options and is pulled in via staticconfig.pri
|
|
2 |
include(staticconfig.pri)
|
|
3 |
!include($$QT_MOBILITY_BUILD_TREE/config.pri) {
|
|
4 |
error("Please run configure script");
|
|
5 |
#also fails if .qmake.cache was not generated which may
|
|
6 |
#happen if we are trying to shadow build w/o running configure
|
|
7 |
}
|
|
8 |
|
|
9 |
#don't build QtMobility if chosen config mismatches Qt's config
|
|
10 |
win32:!contains(CONFIG_WIN32,build_all) {
|
|
11 |
contains(QT_CONFIG,debug):!contains(QT_CONFIG,release):contains(CONFIG_WIN32,release) {
|
|
12 |
# Qt only build in debug mode
|
|
13 |
error(QtMobility cannot be build in release mode if Qt is build in debug mode only)
|
|
14 |
}
|
|
15 |
!contains(QT_CONFIG,debug):contains(QT_CONFIG,release):contains(CONFIG_WIN32,debug) {
|
|
16 |
# Qt only build in release mode
|
|
17 |
error(QtMobility cannot be build in debug mode if Qt is build in release mode only)
|
|
18 |
}
|
|
19 |
}
|
|
20 |
|
|
21 |
lessThan(QT_MAJOR_VERSION, 4) {
|
|
22 |
error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
|
|
23 |
}
|
|
24 |
|
|
25 |
contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 6) {
|
|
26 |
error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
|
|
27 |
}
|
|
28 |
|
|
29 |
|
|
30 |
# MCL builds for Symbian do not run configure and require some manual setup steps.
|
|
31 |
# This test permits SD builds to skip installation of mobility.prf from within qmake.
|
|
32 |
# It is installed in a separate step. MCL builds for SD must set the
|
|
33 |
# MOBILITY_SD_MCL_BUILD flag to yes.
|
|
34 |
!contains(MOBILITY_SD_MCL_BUILD, yes) {
|
|
35 |
#generate prf file for Qt integration
|
|
36 |
PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf
|
|
37 |
|
|
38 |
system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
|
|
39 |
system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
|
|
40 |
system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)
|
|
41 |
|
|
42 |
unix:!symbian:system(cat $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template >> $$PRF_OUTPUT)
|
|
43 |
win32:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
|
|
44 |
symbian:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
|
|
45 |
|
|
46 |
PRF_CONFIG=$${QT_MOBILITY_BUILD_TREE}/features/mobilityconfig.prf
|
|
47 |
system(echo MOBILITY_CONFIG=$${mobility_modules} > $$PRF_CONFIG)
|
|
48 |
system(echo MOBILITY_VERSION = 1.0.2 >> $$PRF_CONFIG)
|
|
49 |
system(echo MOBILITY_MAJOR_VERSION = 1 >> $$PRF_CONFIG)
|
|
50 |
system(echo MOBILITY_MINOR_VERSION = 0 >> $$PRF_CONFIG)
|
|
51 |
system(echo MOBILITY_PATCH_VERSION = 2 >> $$PRF_CONFIG)
|
|
52 |
|
|
53 |
#symbian does not generate make install rule. we have to copy prf manually
|
|
54 |
symbian {
|
|
55 |
FORMATDIR=$$[QT_INSTALL_DATA]\mkspecs\features
|
|
56 |
FORMATDIR=$$replace(FORMATDIR,/,\\ )
|
|
57 |
system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobility.prf $$FORMATDIR")
|
|
58 |
system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobilityconfig.prf $$FORMATDIR")
|
|
59 |
}
|
|
60 |
|
|
61 |
# install config file
|
|
62 |
config.path = $$[QT_INSTALL_DATA]/mkspecs/features
|
|
63 |
config.files = $$QT_MOBILITY_BUILD_TREE/features/mobilityconfig.prf
|
|
64 |
|
|
65 |
# install feature file
|
|
66 |
feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
|
|
67 |
feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
|
|
68 |
INSTALLS += feature config
|
|
69 |
}
|
|
70 |
|
|
71 |
TEMPLATE = subdirs
|
|
72 |
CONFIG+=ordered
|
|
73 |
|
|
74 |
SUBDIRS += src
|
|
75 |
|
|
76 |
contains(build_unit_tests, yes):SUBDIRS+=tests
|
|
77 |
contains(build_examples, yes):SUBDIRS+=examples
|
|
78 |
|
|
79 |
#updating and deployment of translations requires Qt 4.6.3/qtPrepareTool
|
|
80 |
!symbian:defined(qtPrepareTool):SUBDIRS += translations
|
|
81 |
|
|
82 |
# install Qt style headers
|
|
83 |
|
|
84 |
!symbian {
|
|
85 |
contains(mobility_modules,bearer) {
|
|
86 |
qtmheadersbearer.path = $${QT_MOBILITY_INCLUDE}/QtBearer
|
|
87 |
qtmheadersbearer.files = $${QT_MOBILITY_BUILD_TREE}/include/QtBearer/*
|
|
88 |
INSTALLS += qtmheadersbearer
|
|
89 |
}
|
|
90 |
|
|
91 |
contains(mobility_modules,contacts) {
|
|
92 |
qtmheaderscontacts.path = $${QT_MOBILITY_INCLUDE}/QtContacts
|
|
93 |
qtmheaderscontacts.files = $${QT_MOBILITY_BUILD_TREE}/include/QtContacts/*
|
|
94 |
INSTALLS += qtmheaderscontacts
|
|
95 |
}
|
|
96 |
|
|
97 |
contains(mobility_modules,location) {
|
|
98 |
qtmheaderslocation.path = $${QT_MOBILITY_INCLUDE}/QtLocation
|
|
99 |
qtmheaderslocation.files = $${QT_MOBILITY_BUILD_TREE}/include/QtLocation/*
|
|
100 |
INSTALLS += qtmheaderslocation
|
|
101 |
}
|
|
102 |
|
|
103 |
contains(mobility_modules,messaging) {
|
|
104 |
qtmheadersmessaging.path = $${QT_MOBILITY_INCLUDE}/QtMessaging
|
|
105 |
qtmheadersmessaging.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMessaging/*
|
|
106 |
INSTALLS += qtmheadersmessaging
|
|
107 |
}
|
|
108 |
|
|
109 |
contains(mobility_modules,multimedia) {
|
|
110 |
qtmheadersmultimedia.path = $${QT_MOBILITY_INCLUDE}/QtMultimediaKit
|
|
111 |
qtmheadersmultimedia.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMultimediaKit/*
|
|
112 |
INSTALLS += qtmheadersmultimedia
|
|
113 |
}
|
|
114 |
|
|
115 |
contains(mobility_modules,publishsubscribe) {
|
|
116 |
qtmheaderspubsub.path = $${QT_MOBILITY_INCLUDE}/QtPublishSubscribe
|
|
117 |
qtmheaderspubsub.files = $${QT_MOBILITY_BUILD_TREE}/include/QtPublishSubscribe/*
|
|
118 |
INSTALLS += qtmheaderspubsub
|
|
119 |
}
|
|
120 |
|
|
121 |
contains(mobility_modules,serviceframework) {
|
|
122 |
qtmheaderssfw.path = $${QT_MOBILITY_INCLUDE}/QtServiceFramework
|
|
123 |
qtmheaderssfw.files = $${QT_MOBILITY_BUILD_TREE}/include/QtServiceFramework/*
|
|
124 |
INSTALLS += qtmheaderssfw
|
|
125 |
}
|
|
126 |
|
|
127 |
contains(mobility_modules,versit) {
|
|
128 |
qtmheadersversit.path = $${QT_MOBILITY_INCLUDE}/QtVersit
|
|
129 |
qtmheadersversit.files = $${QT_MOBILITY_BUILD_TREE}/include/QtVersit/*
|
|
130 |
INSTALLS += qtmheadersversit
|
|
131 |
}
|
|
132 |
|
|
133 |
contains(mobility_modules,systeminfo) {
|
|
134 |
qtmheaderssysteminfo.path = $${QT_MOBILITY_INCLUDE}/QtSystemInfo
|
|
135 |
qtmheaderssysteminfo.files = $${QT_MOBILITY_BUILD_TREE}/include/QtSystemInfo/*
|
|
136 |
INSTALLS += qtmheaderssysteminfo
|
|
137 |
}
|
|
138 |
|
|
139 |
contains(mobility_modules,sensors) {
|
|
140 |
qtmheaderssensors.path = $${QT_MOBILITY_INCLUDE}/QtSensors
|
|
141 |
qtmheaderssensors.files = $${QT_MOBILITY_BUILD_TREE}/include/QtSensors/*
|
|
142 |
INSTALLS += qtmheaderssensors
|
|
143 |
}
|
|
144 |
} else {
|
|
145 |
#absolute path does not work and
|
|
146 |
#include <QtMyLibrary/class.h> style does not work either
|
|
147 |
qtmAppHeaders = include/QtContacts/* \
|
|
148 |
include/QtVersit/*
|
|
149 |
|
|
150 |
qtmMwHeaders = include/QtBearer/* \
|
|
151 |
include/QtLocation/* \
|
|
152 |
include/QtMessaging/* \
|
|
153 |
include/QtMultimediaKit/* \
|
|
154 |
include/QtPublishSubscribe/* \
|
|
155 |
include/QtServiceFramework/* \
|
|
156 |
include/QtSystemInfo/* \
|
|
157 |
include/QtSensors/*
|
|
158 |
|
|
159 |
contains(mobility_modules,contacts|versit) {
|
|
160 |
for(api, qtmAppHeaders) {
|
|
161 |
INCLUDEFILES=$$files($$api);
|
|
162 |
#files() attaches a ';' at the end which we need to remove
|
|
163 |
cleanedFiles=$$replace(INCLUDEFILES, ;,)
|
|
164 |
cleanedFiles=$$replace(cleanedFiles, \\\,/)
|
|
165 |
for(header, cleanedFiles) {
|
|
166 |
exists($$header):
|
|
167 |
BLD_INF_RULES.prj_exports += "$$header $$APP_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"
|
|
168 |
}
|
|
169 |
}
|
|
170 |
}
|
|
171 |
|
|
172 |
contains(mobility_modules,serviceframework|location|bearer|publishsubscribe|systeminfo|multimedia|messaging) {
|
|
173 |
for(api, qtmMwHeaders) {
|
|
174 |
INCLUDEFILES=$$files($$api);
|
|
175 |
#files() attaches a ';' at the end which we need to remove
|
|
176 |
cleanedFiles=$$replace(INCLUDEFILES, ;,)
|
|
177 |
cleanedFiles=$$replace(cleanedFiles, \\\, /)
|
|
178 |
for(header, cleanedFiles) {
|
|
179 |
exists($$header):
|
|
180 |
BLD_INF_RULES.prj_exports += "$$header $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"
|
|
181 |
}
|
|
182 |
}
|
|
183 |
}
|
|
184 |
}
|
|
185 |
|