author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 02 Feb 2010 00:43:10 +0200 | |
changeset 3 | 41300fa6a67c |
parent 0 | 1918ee327afb |
child 29 | b72c6db6890b |
permissions | -rw-r--r-- |
0 | 1 |
defineReplace(qtLibraryTarget) { |
2 |
unset(LIBRARY_NAME) |
|
3 |
LIBRARY_NAME = $$1 |
|
4 |
mac:!static:contains(QT_CONFIG, qt_framework) { |
|
5 |
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME |
|
6 |
export(QMAKE_FRAMEWORK_BUNDLE_NAME) |
|
7 |
} |
|
8 |
contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) { |
|
9 |
!debug_and_release|build_pass { |
|
10 |
mac:RET = $$member(LIBRARY_NAME, 0)_debug |
|
11 |
else:win32:RET = $$member(LIBRARY_NAME, 0)d |
|
12 |
} |
|
13 |
} |
|
14 |
isEmpty(RET):RET = $$LIBRARY_NAME |
|
15 |
return($$RET) |
|
16 |
} |
|
17 |
||
18 |
defineTest(qtAddLibrary) { |
|
19 |
INCLUDEPATH -= $$QMAKE_INCDIR_QT/$$1 |
|
20 |
INCLUDEPATH = $$QMAKE_INCDIR_QT/$$1 $$INCLUDEPATH |
|
21 |
||
22 |
LIB_NAME = $$1 |
|
23 |
unset(LINKAGE) |
|
24 |
mac { |
|
25 |
CONFIG(qt_framework, qt_framework|qt_no_framework) { #forced |
|
26 |
QMAKE_FRAMEWORKPATH *= $${QMAKE_LIBDIR_QT} |
|
27 |
FRAMEWORK_INCLUDE = $$QMAKE_LIBDIR_QT/$${LIB_NAME}.framework/Headers |
|
28 |
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { |
|
29 |
INCLUDEPATH -= $$FRAMEWORK_INCLUDE |
|
30 |
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH |
|
31 |
} |
|
32 |
LINKAGE = -framework $${LIB_NAME}$${QT_LIBINFIX} |
|
33 |
} else:!qt_no_framework { #detection |
|
34 |
for(frmwrk_dir, $$list($$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH) /Library/Frameworks)) { |
|
35 |
exists($${frmwrk_dir}/$${LIB_NAME}.framework) { |
|
36 |
QMAKE_FRAMEWORKPATH *= $${frmwrk_dir} |
|
37 |
FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers |
|
38 |
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) { |
|
39 |
INCLUDEPATH -= $$FRAMEWORK_INCLUDE |
|
40 |
INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH |
|
41 |
} |
|
42 |
LINKAGE = -framework $${LIB_NAME} |
|
43 |
break() |
|
44 |
} |
|
45 |
} |
|
46 |
} |
|
47 |
} |
|
48 |
symbian { |
|
49 |
isEqual(LIB_NAME, QtGui) { |
|
50 |
# Needed for #include <QtGui> because qs60mainapplication.h includes aknapp.h |
|
51 |
INCLUDEPATH *= $$MW_LAYER_SYSTEMINCLUDE |
|
52 |
} |
|
53 |
isEqual(LIB_NAME, QtWebKit) { |
|
54 |
# Needed for #include <QtXmlPatterns/QtXmlPatterns> because relative inclusion problem in toolchain |
|
55 |
INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtXmlPatterns |
|
56 |
} |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
57 |
isEqual(LIB_NAME, QtXmlPatterns) { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
58 |
# Needed for #include <QtXmlPatterns/QtXmlPatterns> because relative inclusion problem in toolchain |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
59 |
INCLUDEPATH *= $$QMAKE_INCDIR_QT/QtNetwork |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
60 |
} |
0 | 61 |
} |
62 |
isEmpty(LINKAGE) { |
|
63 |
if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { |
|
64 |
win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d |
|
65 |
mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug |
|
66 |
} |
|
67 |
isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX} |
|
68 |
} |
|
69 |
!isEmpty(QMAKE_LSB) { |
|
70 |
QMAKE_LFLAGS *= --lsb-libpath=$$$$QMAKE_LIBDIR_QT |
|
71 |
QMAKE_LFLAGS *= -L/opt/lsb/lib |
|
72 |
QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX} |
|
73 |
} |
|
74 |
LIBS += $$LINKAGE |
|
75 |
export(LIBS) |
|
76 |
export(INCLUDEPATH) |
|
77 |
export(QMAKE_FRAMEWORKPATH) |
|
78 |
export(QMAKE_LFLAGS) |
|
79 |
return(true) |
|
80 |
} |