1 # Include file to make it easy to include WebKit into Qt projects
5 CONFIG(debug, debug|release) {
6 OUTPUT_DIR=$$PWD/WebKitBuild/Debug
8 OUTPUT_DIR=$$PWD/WebKitBuild/Release
12 DEFINES += BUILDING_QT__=1
14 win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
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
25 LIBS += -lQtWebKit$${QT_MAJOR_VERSION}
29 TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB
30 TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
35 DEPENDPATH += $$PWD/WebKit/qt/Api
39 DEFINES += USE_SYSTEM_MALLOC
42 CONFIG(release, debug|release) {
47 INCLUDEPATH += $$PWD/WebKit/qt/Api
50 *-g++*:QMAKE_CXXFLAGS += -Wall -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self
52 # Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT
54 RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
55 RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
56 DEFINES *= QT_NO_UITOOLS
60 QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
61 QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS
65 QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS
68 contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
70 # Disable a few warnings on Windows. The warnings are also
71 # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
72 win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
75 # For builds inside Qt we interpret the output rule and the input of each extra compiler manually
76 # and add the resulting sources to the SOURCES variable, because the build inside Qt contains already
77 # all the generated files. We do not need to generate any extra compiler rules in that case.
79 # In addition this function adds a new target called 'generated_files' that allows manually calling
80 # all the extra compilers to generate all the necessary files for the build using 'make generated_files'
82 defineTest(addExtraCompiler) {
84 outputRule = $$eval($${1}.output)
85 outVariable = $$eval($${1}.variable_out)
86 !isEqual(outVariable,GENERATED_SOURCES):return(true)
88 input = $$eval($${1}.input)
89 input = $$eval($$input)
92 base = $$basename(file)
94 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
100 QMAKE_EXTRA_COMPILERS += $$1
101 generated_files.depends += compiler_$${1}_make_all
102 export(QMAKE_EXTRA_COMPILERS)
103 export(generated_files.depends)
108 defineTest(addExtraCompilerWithHeader) {
109 addExtraCompiler($$1)
111 eval(headerFile = $${2})
112 isEmpty(headerFile) {
113 eval($${1}_header.output = $$eval($${1}.output))
114 eval($${1}_header.output ~= s/\.cpp/.h/)
115 eval($${1}_header.output ~= s/\.c/.h/)
117 eval($${1}_header.output = $$headerFile)
120 eval($${1}_header.input = $$eval($${1}.input))
121 eval($${1}_header.commands = @echo -n '')
122 eval($${1}_header.depends = compiler_$${1}_make_all)
123 eval($${1}_header.variable_out = GENERATED_FILES)
125 export($${1}_header.output)
126 export($${1}_header.input)
127 export($${1}_header.commands)
128 export($${1}_header.depends)
129 export($${1}_header.variable_out)
131 !CONFIG(QTDIR_build): QMAKE_EXTRA_COMPILERS += $${1}_header
133 export(QMAKE_EXTRA_COMPILERS)
134 export(generated_files.depends)