File: qtmobility.pro

package info (click to toggle)
qtmobility 1.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 169,300 kB
  • ctags: 92,483
  • sloc: cpp: 759,105; ansic: 16,292; xml: 5,054; sh: 920; perl: 369; makefile: 167
file content (292 lines) | stat: -rw-r--r-- 11,450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# config.pri specifies the configure options and is pulled in via staticconfig.pri
include(staticconfig.pri)
!include($$QT_MOBILITY_BUILD_TREE/config.pri) {
    error("Please run configure script");
    #also fails if .qmake.cache was not generated which may
    #happen if we are trying to shadow build w/o running configure
}

#don't build QtMobility if chosen config mismatches Qt's config
win32:!contains(CONFIG_WIN32,build_all) {
   contains(QT_CONFIG,debug):!contains(QT_CONFIG,release):contains(CONFIG_WIN32,release) {
       # Qt only build in debug mode
       error(QtMobility cannot be build in release mode if Qt is build in debug mode only)
   }
   !contains(QT_CONFIG,debug):contains(QT_CONFIG,release):contains(CONFIG_WIN32,debug) {
       # Qt only build in release mode
       error(QtMobility cannot be build in debug mode if Qt is build in release mode only)
   }
}

lessThan(QT_MAJOR_VERSION, 4) {
    error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
}

contains(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 6) {
    error(Qt Mobility requires Qt 4.6 or higher. Qt $${QT_VERSION} was found.);
}


# MCL builds for Symbian do not run configure and require some manual setup steps.
# This test permits SD builds to skip installation of mobility.prf from within qmake.
# It is installed in a separate step. MCL builds for SD must set the
# MOBILITY_SD_MCL_BUILD flag to yes.
!contains(MOBILITY_SD_MCL_BUILD, yes) {
    #generate prf file for Qt integration
    PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf

    system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
    system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
    system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)

    sourcePath = $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template
    contains(QMAKE_HOST.os,Windows) {
        sourcePath=$$replace(sourcePath,/,\\)
        system(type $${sourcePath} >> $$PRF_OUTPUT)
    } else {
        system(cat $${sourcePath} >> $$PRF_OUTPUT)
    }

    symbian:contains(nfc_symbian_enabled,yes) {
        contains(QMAKE_HOST.os,Windows) {
            system(echo $$LITERAL_HASH Connectivity depends on service framework on Symbian >> $$PRF_OUTPUT)
            system(echo contains(MOBILITY, connectivity):MOBILITY += serviceframework >> $$PRF_OUTPUT)
        } else {
            system(echo \\$$LITERAL_HASH Connectivity depends on service framework on Symbian >> $$PRF_OUTPUT)
            system(echo contains\\(MOBILITY, connectivity\\):MOBILITY += serviceframework >> $$PRF_OUTPUT)
        }
    }

    # Remember to update staticconfig.pri binary version statement
    # and pregenerated files under src/s60installs for Symbian RnD release
    PRF_CONFIG=$${QT_MOBILITY_BUILD_TREE}/features/mobilityconfig.prf
    system(echo MOBILITY_CONFIG=$${mobility_modules} > $$PRF_CONFIG)
    system(echo MOBILITY_VERSION = 1.2.0 >> $$PRF_CONFIG)
    system(echo MOBILITY_MAJOR_VERSION = 1 >> $$PRF_CONFIG)
    system(echo MOBILITY_MINOR_VERSION = 2 >> $$PRF_CONFIG)
    system(echo MOBILITY_PATCH_VERSION = 0 >> $$PRF_CONFIG)

    #symbian does not generate make install rule. we have to copy prf manually 
    symbian {
        sourcePath=$$QT_MOBILITY_BUILD_TREE/features/
        destPath=$$[QT_INSTALL_DATA]/mkspecs/features

        contains(QMAKE_HOST.os,Windows) {
            sourcePath=$$replace(sourcePath,/,\\)
            destPath=$$replace(destPath,/,\\)
        }

        system($$QMAKE_COPY "$${sourcePath}mobility.prf" "$$destPath")
        system($$QMAKE_COPY "$${sourcePath}mobilityconfig.prf" "$$destPath")
    }

    # install config file
    config.path = $$[QT_INSTALL_DATA]/mkspecs/features
    config.files = $$QT_MOBILITY_BUILD_TREE/features/mobilityconfig.prf

    # install feature file
    feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
    feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
    INSTALLS += feature config
}

TEMPLATE = subdirs
CONFIG+=ordered

SUBDIRS += src

contains(build_tools, yes) {
    SUBDIRS += tools
}

SUBDIRS += plugins

#built documentation snippets, if enabled
contains(build_docs, yes) {
    SUBDIRS += doc
    include(doc/doc.pri)

    OTHER_FILES += \
        doc/src/*.qdoc \
        doc/src/legal/*.qdoc \
        doc/src/examples/*.qdoc \
        doc/src/plugins/*.qdoc
}

contains(build_unit_tests, yes):SUBDIRS+=tests
contains(build_examples, yes):SUBDIRS+=examples
contains(build_demos, yes):SUBDIRS+=demos

#updating and deployment of translations requires Qt 4.6.3/qtPrepareTool
!symbian:defined(qtPrepareTool):SUBDIRS += translations

# install Qt style headers

!symbian {
    qtmheadersglobal.path = $${QT_MOBILITY_INCLUDE}/QtMobility
    qtmheadersglobal.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMobility/*
    INSTALLS += qtmheadersglobal

    contains(mobility_modules,bearer) {
        qtmheadersbearer.path = $${QT_MOBILITY_INCLUDE}/QtBearer
        qtmheadersbearer.files = $${QT_MOBILITY_BUILD_TREE}/include/QtBearer/*
        INSTALLS += qtmheadersbearer
    }

    contains(mobility_modules,contacts) {
        qtmheaderscontacts.path = $${QT_MOBILITY_INCLUDE}/QtContacts
        qtmheaderscontacts.files = $${QT_MOBILITY_BUILD_TREE}/include/QtContacts/*
        INSTALLS += qtmheaderscontacts
    }

    contains(mobility_modules,location) {
        qtmheaderslocation.path = $${QT_MOBILITY_INCLUDE}/QtLocation
        qtmheaderslocation.files = $${QT_MOBILITY_BUILD_TREE}/include/QtLocation/*
        INSTALLS += qtmheaderslocation
    }

    contains(qmf_enabled, yes)|wince*|win32|maemo5 {
        contains(mobility_modules,messaging) {
            qtmheadersmessaging.path = $${QT_MOBILITY_INCLUDE}/QtMessaging
            qtmheadersmessaging.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMessaging/*
            INSTALLS += qtmheadersmessaging
        }
    }

    contains(mobility_modules,multimedia) {
        qtmheadersmultimedia.path = $${QT_MOBILITY_INCLUDE}/QtMultimediaKit
        qtmheadersmultimedia.files = $${QT_MOBILITY_BUILD_TREE}/include/QtMultimediaKit/*
        INSTALLS += qtmheadersmultimedia
    }

    contains(mobility_modules,publishsubscribe) {
        qtmheaderspubsub.path = $${QT_MOBILITY_INCLUDE}/QtPublishSubscribe
        qtmheaderspubsub.files = $${QT_MOBILITY_BUILD_TREE}/include/QtPublishSubscribe/*
        INSTALLS += qtmheaderspubsub
    }

    contains(mobility_modules,serviceframework) {
        qtmheaderssfw.path = $${QT_MOBILITY_INCLUDE}/QtServiceFramework
        qtmheaderssfw.files = $${QT_MOBILITY_BUILD_TREE}/include/QtServiceFramework/*
        INSTALLS += qtmheaderssfw
    }

    contains(mobility_modules,versit) {
        qtmheadersversit.path = $${QT_MOBILITY_INCLUDE}/QtVersit
        qtmheadersversit.files = $${QT_MOBILITY_BUILD_TREE}/include/QtVersit/*
        INSTALLS += qtmheadersversit

        contains(mobility_modules,organizer) {
            qtmheadersversitorg.path = $${QT_MOBILITY_INCLUDE}/QtVersitOrganizer
            qtmheadersversitorg.files = $${QT_MOBILITY_BUILD_TREE}/include/QtVersitOrganizer/*
            INSTALLS += qtmheadersversitorg
        }
    }

    contains(mobility_modules,systeminfo) {
        qtmheaderssysteminfo.path = $${QT_MOBILITY_INCLUDE}/QtSystemInfo
        qtmheaderssysteminfo.files = $${QT_MOBILITY_BUILD_TREE}/include/QtSystemInfo/*
        INSTALLS += qtmheaderssysteminfo
    }

    contains(mobility_modules,sensors) {
        qtmheaderssensors.path = $${QT_MOBILITY_INCLUDE}/QtSensors
        qtmheaderssensors.files = $${QT_MOBILITY_BUILD_TREE}/include/QtSensors/*
        INSTALLS += qtmheaderssensors
    }

    contains(mobility_modules,organizer) {
        qtmheadersorganizer.path = $${QT_MOBILITY_INCLUDE}/QtOrganizer
        qtmheadersorganizer.files = $${QT_MOBILITY_BUILD_TREE}/include/QtOrganizer/*
        INSTALLS += qtmheadersorganizer
    }

    contains(mobility_modules,feedback) {
        qtmheadersfeedback.path = $${QT_MOBILITY_INCLUDE}/QtFeedback
        qtmheadersfeedback.files = $${QT_MOBILITY_BUILD_TREE}/include/QtFeedback/*
        INSTALLS += qtmheadersfeedback
    }

    contains(mobility_modules,gallery) {
        qtmheadersgallery.path = $${QT_MOBILITY_INCLUDE}/QtGallery
        qtmheadersgallery.files = $${QT_MOBILITY_BUILD_TREE}/include/QtGallery/*
        INSTALLS += qtmheadersgallery
    }

    contains(mobility_modules,connectivity) {
        qtmheaderconnectivity.path = $${QT_MOBILITY_INCLUDE}/QtConnectivity
        qtmheaderconnectivity.files = $${QT_MOBILITY_BUILD_TREE}/include/QtConnectivity/*
        INSTALLS += qtmheaderconnectivity
    }
} else {
    # following needs to be set because symbian-abld or symbian-sbsv2 is not yet
    # defined in platform_paths.prf and the prj_export gets confused about paths.
    epocroot_prefix = /
    #absolute path does not work and 
    #include <QtMyLibrary/class.h> style does not work either
    qtmGlobalHeaders = include/QtMobility/*
    for(api, qtmGlobalHeaders) {
        INCLUDEFILES=$$files($$api);
        #files() attaches a ';' at the end which we need to remove
        cleanedFiles=$$replace(INCLUDEFILES, ;,)
        for(header, cleanedFiles) {
            exists($$header):
                BLD_INF_RULES.prj_exports += "$$header $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"
        }
    }


    qtmAppHeaders = include/QtContacts/* \
                       include/QtVersit/* \
                       include/QtVersitOrganizer/* \
                       include/QtOrganizer/*

    qtmMwHeaders = include/QtBearer/* \
                       include/QtLocation/* \
                       include/QtMessaging/* \
                       include/QtMultimediaKit/* \
                       include/QtPublishSubscribe/* \
                       include/QtServiceFramework/* \
                       include/QtSystemInfo/* \
                       include/QtSensors/* \
                       include/QtFeedback/* \
                       include/QtGallery/* \
                       include/QtConnectivity/*

    contains(mobility_modules,contacts|versit|organizer) {
        for(api, qtmAppHeaders) {
            INCLUDEFILES=$$files($$api);

            #files() attaches a ';' at the end which we need to remove
            cleanedFiles=$$replace(INCLUDEFILES, ;,)

            #files() uses windows path separator ('\')  but bld.inf requires '/'
            INCLUDEFILES=$$cleanedFiles
            cleanedFiles=$$replace(INCLUDEFILES, \\\\,/)

            for(header, cleanedFiles) {
                exists($$header):
                    BLD_INF_RULES.prj_exports += "$$header $$APP_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"
            }
        }
    }

    contains(mobility_modules,serviceframework|location|bearer|publishsubscribe|systeminfo|multimedia|messaging|feedback|sensors|gallery|connectivity) {
        for(api, qtmMwHeaders) {
            INCLUDEFILES=$$files($$api);

            #files() attaches a ';' at the end which we need to remove
            cleanedFiles=$$replace(INCLUDEFILES, ;,)

            #files() uses windows path separator ('\')  but bld.inf requires '/'
            INCLUDEFILES=$$cleanedFiles
            cleanedFiles=$$replace(INCLUDEFILES, \\\\,/)

            for(header, cleanedFiles) {
                exists($$header):
                    BLD_INF_RULES.prj_exports += "$$header $$MW_LAYER_PUBLIC_EXPORT_PATH($$basename(header))"
            }
        }
    }
}