|
1 # |
|
2 ############################################################################# |
|
3 ## |
|
4 ## Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
5 ## All rights reserved. |
|
6 ## Contact: Nokia Corporation (developer.feedback@nokia.com) |
|
7 ## |
|
8 ## This file is part of the UI Extensions for Mobile. |
|
9 ## |
|
10 ## GNU Lesser General Public License Usage |
|
11 ## This file may be used under the terms of the GNU Lesser General Public |
|
12 ## License version 2.1 as published by the Free Software Foundation and |
|
13 ## appearing in the file LICENSE.LGPL included in the packaging of this file. |
|
14 ## Please review the following information to ensure the GNU Lesser General |
|
15 ## Public License version 2.1 requirements will be met: |
|
16 ## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
17 ## |
|
18 ## In addition, as a special exception, Nokia gives you certain additional |
|
19 ## rights. These rights are described in the Nokia Qt LGPL Exception |
|
20 ## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
21 ## |
|
22 ## If you have questions regarding the use of this file, please contact |
|
23 ## Nokia at developer.feedback@nokia.com. |
|
24 ## |
|
25 ############################################################################# |
|
26 # |
|
27 |
|
28 defineReplace(hbLibraryTarget) { |
|
29 unset(LIBRARY_NAME) |
|
30 LIBRARY_NAME = $$1 |
|
31 # the following leads to ugly vcproj names but had to be commented |
|
32 # out, because it broke vcproj generator dependency checks |
|
33 #!debug_and_release|build_pass { <-- |
|
34 CONFIG(debug, debug|release) { |
|
35 mac:RET = $$member(LIBRARY_NAME, 0)_debug |
|
36 else:win32:RET = $$member(LIBRARY_NAME, 0)d |
|
37 } |
|
38 #} |
|
39 isEmpty(RET):RET = $$LIBRARY_NAME |
|
40 return($$RET) |
|
41 } |
|
42 |
|
43 # params: <collection/library> |
|
44 # eg. hbAddLibrary(hbcore/HbCore) |
|
45 defineTest(hbAddLibrary) { |
|
46 PARTS = $$split(1, "/") |
|
47 COLLECTION = $$lower($$first(PARTS)) |
|
48 LIBRARY = $$last(PARTS) |
|
49 |
|
50 INCLUDEPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION} |
|
51 INCLUDEPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION}/private |
|
52 DEPENDPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION} |
|
53 DEPENDPATH *= $${HB_BUILD_DIR}/include/$${COLLECTION}/private |
|
54 |
|
55 LIBS *= -L$${HB_BUILD_DIR}/lib |
|
56 LIBS *= -l$$hbLibraryTarget($$LIBRARY) |
|
57 unix:!symbian:!isEmpty(QMAKE_RPATH):QMAKE_LFLAGS *= $${QMAKE_RPATH}$${HB_BUILD_DIR}/lib |
|
58 unix:HB_COVERAGE_EXCLUDE += \"*/$$COLLECTION/*\" |
|
59 |
|
60 export(LIBS) |
|
61 export(INCLUDEPATH) |
|
62 export(DEPENDPATH) |
|
63 export(QMAKE_LFLAGS) |
|
64 export(HB_COVERAGE_EXCLUDE) |
|
65 return(true) |
|
66 } |
|
67 |
|
68 # params: <collection> |
|
69 # NOTE: PUBLIC_HEADERS, INTERNAL_HEADERS, CONVENIENCE_HEADERS |
|
70 # eg. hbExportHeaders(hbcore) |
|
71 defineTest(hbExportHeaders) { |
|
72 for(PUBLIC_HEADER, PUBLIC_HEADERS) { |
|
73 PUBLIC_HEADER = $$section(PUBLIC_HEADER, ":", 1) |
|
74 EXPORT_PATH = $$sprintf($$HB_EXPORT_DIR, $$1, $$basename(PUBLIC_HEADER)) |
|
75 BLD_INF_RULES.prj_exports *= "$$PUBLIC_HEADER $$EXPORT_PATH" |
|
76 } |
|
77 # DO NOT EXPORT PRIVATE HEADERS! |
|
78 #for(INTERNAL_HEADER, INTERNAL_HEADERS) { |
|
79 # INTERNAL_HEADER = $$section(INTERNAL_HEADER, ":", 1) |
|
80 # EXPORT_PATH = $$sprintf($$HB_PRIVATE_EXPORT_DIR, $$1, $$basename(INTERNAL_HEADER)) |
|
81 # BLD_INF_RULES.prj_exports *= "$$INTERNAL_HEADER $$EXPORT_PATH" |
|
82 #} |
|
83 for(CONVENIENCE_HEADER, CONVENIENCE_HEADERS) { |
|
84 CONVENIENCE_HEADER = $$section(CONVENIENCE_HEADER, ":", 1) |
|
85 EXPORT_PATH = $$sprintf($$HB_EXPORT_DIR, $$1, $$basename(CONVENIENCE_HEADER)) |
|
86 BLD_INF_RULES.prj_exports *= "$$CONVENIENCE_HEADER $$EXPORT_PATH" |
|
87 } |
|
88 export(BLD_INF_RULES.prj_exports) |
|
89 return(true) |
|
90 } |
|
91 |
|
92 # params: <path> |
|
93 # eg. features.path = $$hbNativePath($$[QMAKE_MKSPECS]/features) |
|
94 defineReplace(hbNativePath) { |
|
95 symbian|win32:!win32-g++ { |
|
96 unixstyle = false |
|
97 } else:win32-g++:isEmpty(QMAKE_SH) { |
|
98 unixstyle = false |
|
99 } else { |
|
100 unixstyle = true |
|
101 } |
|
102 $$unixstyle { |
|
103 return($$quote(\"$$replace(1, "\\", "/")\")) |
|
104 } else { |
|
105 return($$quote(\"$$replace(1, "/", "\\")\")) |
|
106 } |
|
107 } |