1 # Include file to make it easy to include WebKit into Qt projects
5 CONFIG(release):OUTPUT_DIR=$$PWD/WebKitBuild/Release
6 CONFIG(debug):OUTPUT_DIR=$$PWD/WebKitBuild/Debug
9 DEFINES += BUILDING_QT__=1
11 win32-msvc*: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
13 QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
15 DEPENDPATH += $$PWD/WebKit/qt/Api
18 DEFINES += USE_SYSTEM_MALLOC
24 INCLUDEPATH += $$PWD/WebKit/qt/Api
27 # For builds inside Qt we interpret the output rule and the input of each extra compiler manually
28 # and add the resulting sources to the SOURCES variable, because the build inside Qt contains already
29 # all the generated files. We do not need to generate any extra compiler rules in that case.
31 # In addition this function adds a new target called 'generated_files' that allows manually calling
32 # all the extra compilers to generate all the necessary files for the build using 'make generated_files'
34 defineTest(addExtraCompiler) {
36 outputRule = $$eval($${1}.output)
38 input = $$eval($${1}.input)
39 input = $$eval($$input)
42 base = $$basename(file)
44 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
50 QMAKE_EXTRA_COMPILERS += $$1
51 generated_files.depends += compiler_$${1}_make_all
52 export(QMAKE_EXTRA_COMPILERS)
53 export(generated_files.depends)
58 defineTest(addExtraCompilerWithHeader) {
61 eval(headerFile = $${2})
63 eval($${1}_header.output = $$eval($${1}.output))
64 eval($${1}_header.output ~= s/\.cpp/.h/)
65 eval($${1}_header.output ~= s/\.c/.h/)
67 eval($${1}_header.output = $$headerFile)
70 eval($${1}_header.input = $$eval($${1}.input))
71 eval($${1}_header.commands = @echo -n '')
72 eval($${1}_header.depends = compiler_$${1}_make_all)
73 eval($${1}_header.variable_out = GENERATED_FILES)
75 export($${1}_header.output)
76 export($${1}_header.input)
77 export($${1}_header.commands)
78 export($${1}_header.depends)
79 export($${1}_header.variable_out)
81 !CONFIG(QTDIR_build): QMAKE_EXTRA_COMPILERS += $${1}_header
83 export(QMAKE_EXTRA_COMPILERS)
84 export(generated_files.depends)