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*: 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 += -Wreturn-type -fno-strict-aliasing
51 #QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter
53 # Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT
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
61 QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
62 QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS
66 QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS
69 contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
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
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.
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'
83 defineTest(addExtraCompiler) {
85 outputRule = $$eval($${1}.output)
86 outVariable = $$eval($${1}.variable_out)
87 !isEqual(outVariable,GENERATED_SOURCES):return(true)
89 input = $$eval($${1}.input)
90 input = $$eval($$input)
93 base = $$basename(file)
95 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
101 QMAKE_EXTRA_COMPILERS += $$1
102 generated_files.depends += compiler_$${1}_make_all
103 export(QMAKE_EXTRA_COMPILERS)
104 export(generated_files.depends)
109 defineTest(addExtraCompilerWithHeader) {
110 addExtraCompiler($$1)
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/)
118 eval($${1}_header.output = $$headerFile)
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)
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)
132 !CONFIG(QTDIR_build): QMAKE_EXTRA_COMPILERS += $${1}_header
134 export(QMAKE_EXTRA_COMPILERS)
135 export(generated_files.depends)