author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 12 Mar 2010 15:46:37 +0200 | |
branch | RCL_3 |
changeset 5 | d3bac044e0f0 |
parent 3 | 41300fa6a67c |
permissions | -rw-r--r-- |
0 | 1 |
# Include file to make it easy to include WebKit into Qt projects |
2 |
||
3 |
||
4 |
isEmpty(OUTPUT_DIR) { |
|
5 |
CONFIG(debug, debug|release) { |
|
6 |
OUTPUT_DIR=$$PWD/WebKitBuild/Debug |
|
7 |
} else { # Release |
|
8 |
OUTPUT_DIR=$$PWD/WebKitBuild/Release |
|
9 |
} |
|
10 |
} |
|
11 |
||
12 |
DEFINES += BUILDING_QT__=1 |
|
13 |
building-libs { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
14 |
win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32 |
0 | 15 |
} else { |
16 |
CONFIG(QTDIR_build) { |
|
17 |
QT += webkit |
|
18 |
} else { |
|
19 |
QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR |
|
20 |
mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) { |
|
21 |
LIBS += -framework QtWebKit |
|
22 |
QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH |
|
23 |
} else { |
|
24 |
win32-*|wince* { |
|
25 |
LIBS += -lQtWebKit$${QT_MAJOR_VERSION} |
|
26 |
} else { |
|
27 |
LIBS += -lQtWebKit |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
28 |
symbian { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
29 |
TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
30 |
TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
31 |
} |
0 | 32 |
} |
33 |
} |
|
34 |
} |
|
35 |
DEPENDPATH += $$PWD/WebKit/qt/Api |
|
36 |
} |
|
37 |
||
38 |
!mac:!unix|symbian { |
|
39 |
DEFINES += USE_SYSTEM_MALLOC |
|
40 |
} |
|
41 |
||
42 |
CONFIG(release, debug|release) { |
|
43 |
DEFINES += NDEBUG |
|
44 |
} |
|
45 |
||
46 |
BASE_DIR = $$PWD |
|
47 |
INCLUDEPATH += $$PWD/WebKit/qt/Api |
|
48 |
||
49 |
CONFIG -= warn_on |
|
50 |
*-g++*:QMAKE_CXXFLAGS += -Wreturn-type -fno-strict-aliasing |
|
51 |
#QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter |
|
52 |
||
53 |
# Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT |
|
54 |
symbian|*-armcc { |
|
55 |
RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293 |
|
56 |
RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates |
|
57 |
DEFINES *= QT_NO_UITOOLS |
|
58 |
} |
|
59 |
||
60 |
*-armcc { |
|
61 |
QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS |
|
62 |
QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS |
|
63 |
} |
|
64 |
||
65 |
symbian { |
|
66 |
QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS |
|
67 |
} |
|
68 |
||
69 |
contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools |
|
70 |
||
71 |
# Disable a few warnings on Windows. The warnings are also |
|
72 |
# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops |
|
73 |
win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 |
|
74 |
||
75 |
# |
|
76 |
# For builds inside Qt we interpret the output rule and the input of each extra compiler manually |
|
77 |
# and add the resulting sources to the SOURCES variable, because the build inside Qt contains already |
|
78 |
# all the generated files. We do not need to generate any extra compiler rules in that case. |
|
79 |
# |
|
80 |
# In addition this function adds a new target called 'generated_files' that allows manually calling |
|
81 |
# all the extra compilers to generate all the necessary files for the build using 'make generated_files' |
|
82 |
# |
|
83 |
defineTest(addExtraCompiler) { |
|
84 |
CONFIG(QTDIR_build) { |
|
85 |
outputRule = $$eval($${1}.output) |
|
86 |
outVariable = $$eval($${1}.variable_out) |
|
87 |
!isEqual(outVariable,GENERATED_SOURCES):return(true) |
|
88 |
||
89 |
input = $$eval($${1}.input) |
|
90 |
input = $$eval($$input) |
|
91 |
||
92 |
for(file,input) { |
|
93 |
base = $$basename(file) |
|
94 |
base ~= s/\..+// |
|
95 |
newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base) |
|
96 |
SOURCES += $$newfile |
|
97 |
} |
|
98 |
||
99 |
export(SOURCES) |
|
100 |
} else { |
|
101 |
QMAKE_EXTRA_COMPILERS += $$1 |
|
102 |
generated_files.depends += compiler_$${1}_make_all |
|
103 |
export(QMAKE_EXTRA_COMPILERS) |
|
104 |
export(generated_files.depends) |
|
105 |
} |
|
106 |
return(true) |
|
107 |
} |
|
108 |
||
109 |
defineTest(addExtraCompilerWithHeader) { |
|
110 |
addExtraCompiler($$1) |
|
111 |
||
112 |
eval(headerFile = $${2}) |
|
113 |
isEmpty(headerFile) { |
|
114 |
eval($${1}_header.output = $$eval($${1}.output)) |
|
115 |
eval($${1}_header.output ~= s/\.cpp/.h/) |
|
116 |
eval($${1}_header.output ~= s/\.c/.h/) |
|
117 |
} else { |
|
118 |
eval($${1}_header.output = $$headerFile) |
|
119 |
} |
|
120 |
||
121 |
eval($${1}_header.input = $$eval($${1}.input)) |
|
122 |
eval($${1}_header.commands = @echo -n '') |
|
123 |
eval($${1}_header.depends = compiler_$${1}_make_all) |
|
124 |
eval($${1}_header.variable_out = GENERATED_FILES) |
|
125 |
||
126 |
export($${1}_header.output) |
|
127 |
export($${1}_header.input) |
|
128 |
export($${1}_header.commands) |
|
129 |
export($${1}_header.depends) |
|
130 |
export($${1}_header.variable_out) |
|
131 |
||
132 |
!CONFIG(QTDIR_build): QMAKE_EXTRA_COMPILERS += $${1}_header |
|
133 |
||
134 |
export(QMAKE_EXTRA_COMPILERS) |
|
135 |
export(generated_files.depends) |
|
136 |
export(SOURCES) |
|
137 |
||
138 |
return(true) |
|
139 |
} |
|
140 |