|
1 |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: homescreenapp project - common QMake settings |
|
15 # |
|
16 |
|
17 CONFIG += debug_and_release |
|
18 |
|
19 # On win32 and mac, debug and release libraries are named differently. |
|
20 # We must follow the debug and release settings Qt was compiled with: |
|
21 # build debug iff Qt built debug, build release iff Qt built release. |
|
22 win32|mac { |
|
23 !contains(QT_CONFIG,debug)|!contains(QT_CONFIG,release) { |
|
24 CONFIG -= debug_and_release debug release |
|
25 contains(QT_CONFIG,debug): CONFIG+=debug |
|
26 contains(QT_CONFIG,release):CONFIG+=release |
|
27 } |
|
28 } |
|
29 |
|
30 CONFIG(debug, debug|release) { |
|
31 SUBDIRPART = debug |
|
32 } else { |
|
33 SUBDIRPART = release |
|
34 } |
|
35 |
|
36 !symbian: OUTPUT_DIR = $$PWD/../../bin/$$SUBDIRPART |
|
37 symbian: OUTPUT_DIR = $$PWD/bin |
|
38 |
|
39 SOURCE_DIR = $$PWD/inc |
|
40 |
|
41 #test whether we have a unit test |
|
42 !testcase { |
|
43 OBJECTS_DIR = $$OUTPUT_DIR/tmp/$$TARGET |
|
44 DESTDIR = $$OUTPUT_DIR |
|
45 MOC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/moc |
|
46 RCC_DIR = $$OUTPUT_DIR/tmp/$$TARGET/rcc |
|
47 UI_DIR = $$OUTPUT_DIR/tmp/$$TARGET/ui |
|
48 CONFIG -= app_bundle |
|
49 } else { # test part is NOT DONE |
|
50 QT *= testlib |
|
51 CONFIG += console |
|
52 CONFIG -= app_bundle |
|
53 OBJECTS_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET |
|
54 DESTDIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART |
|
55 MOC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/moc |
|
56 RCC_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/rcc |
|
57 UI_DIR = $$OUTPUT_DIR/bin/tests/$$SUBDIRPART/tmp/$$TARGET/ui |
|
58 LIBS += -L$$OUTPUT_DIR/bin/$$SUBDIRPART/bin #link against library that we test |
|
59 } |
|
60 |
|
61 # Add the output dirs to the link path too |
|
62 LIBS += -L$$DESTDIR |
|
63 |
|
64 DEPENDPATH += . $$SOURCE_DIR |
|
65 INCLUDEPATH += . $$SOURCE_DIR |
|
66 #For some reason the default include path doesn't include MOC_DIR on symbian |
|
67 symbian { |
|
68 INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE |
|
69 INCLUDEPATH += $$MOC_DIR |
|
70 TARGET.CAPABILITY = ALL -TCB |
|
71 TARGET.EPOCALLOWDLLDATA=1 |
|
72 } else { |
|
73 # add platfrom API for windows |
|
74 INCLUDEPATH += \ |
|
75 $$PWD/../../homescreensrv/homescreensrv_plat/contentstorage_api \ |
|
76 $$PWD/../../homescreensrv/homescreensrv_plat/homescreen_information_api/inc |
|
77 } |
|
78 |
|
79 plugin: !isEmpty(PLUGIN_SUBDIR): DESTDIR = $$OUTPUT_DIR/$$PLUGIN_SUBDIR |
|
80 |
|
81 !symbian: plugin { # copy manifiers |
|
82 manifest.path = $$DESTDIR |
|
83 manifest.files = ./resource/*.manifest ./resource/*.xml |
|
84 manifest.CONFIG += no_build |
|
85 |
|
86 INSTALLS += manifest |
|
87 PRE_TARGETDEPS += install_manifest |
|
88 |
|
89 } |
|
90 |
|
91 symbian: plugin { # copy qtstub and manifest |
|
92 |
|
93 pluginstub.sources = $${TARGET}.dll |
|
94 pluginstub.path = $$PLUGIN_SUBDIR |
|
95 |
|
96 DEPLOYMENT += pluginstub |
|
97 |
|
98 qtplugins.path = $$PLUGIN_SUBDIR |
|
99 qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin |
|
100 |
|
101 hs_public_plugin { |
|
102 contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:/private/20022F35/$${TARGET}.xml" |
|
103 } else { |
|
104 contains(MOBILITY, serviceframework):BLD_INF_RULES.prj_exports += "resource/$${TARGET}.xml z:$$qtplugins.path/$${TARGET}.xml" |
|
105 } |
|
106 |
|
107 for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)" |
|
108 } |
|
109 |
|
110 defineTest(exportResources) { |
|
111 symbian { |
|
112 for(subdirs, 1) { |
|
113 entries = $$files($$subdirs) |
|
114 for(entry, entries) : BLD_INF_RULES.prj_exports += "./$$entry z:/$$replace(2, ^/,)/$$basename(entry)" |
|
115 } |
|
116 export ( BLD_INF_RULES.prj_exports) |
|
117 } else { |
|
118 name = $$replace(1, [/\\\\\.\*], _) |
|
119 eval ($${name}.path = $${OUTPUT_DIR}/$${2}) |
|
120 eval ($${name}.files = $$1) |
|
121 eval ($${name}.CONFIG += no_build) |
|
122 |
|
123 INSTALLS += $$name |
|
124 PRE_TARGETDEPS += install_$${name} |
|
125 |
|
126 export ( $${name}.path ) |
|
127 export ( $${name}.files ) |
|
128 export ( $${name}.CONFIG ) |
|
129 export ( INSTALLS ) |
|
130 export ( PRE_TARGETDEPS ) |
|
131 } |
|
132 } |
|
133 |
|
134 symbian { |
|
135 DEFINES += QT_EXTENSIONS |
|
136 } |
|
137 |
|
138 |
|
139 # support for NFT |
|
140 nft:DEFINES += NFT |
|
141 |
|
142 release:DEFINES+=QT_NO_DEBUG_OUTPUT |
|
143 |
|
144 nft:release { |
|
145 DEFINES -=QT_NO_DEBUG_OUTPUT |
|
146 } |
|
147 |
|
148 symbian { |
|
149 SYMBIAN_PLATFORMS = WINSCW ARMV5 |
|
150 } |