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
16 QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
19 DEPENDPATH += $$PWD/WebKit/qt/Api
22 DEFINES += USE_SYSTEM_MALLOC
28 INCLUDEPATH += $$PWD/WebKit/qt/Api
31 # For builds inside Qt we interpret the output rule and the input of each extra compiler manually
32 # and add the resulting sources to the SOURCES variable, because the build inside Qt contains already
33 # all the generated files. We do not need to generate any extra compiler rules in that case.
35 # In addition this function adds a new target called 'generated_files' that allows manually calling
36 # all the extra compilers to generate all the necessary files for the build using 'make generated_files'
38 defineTest(addExtraCompiler) {
40 outputRule = $$eval($${1}.output)
42 input = $$eval($${1}.input)
43 input = $$eval($$input)
46 base = $$basename(file)
48 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
54 QMAKE_EXTRA_COMPILERS += $$1
55 generated_files.depends += compiler_$${1}_make_all
56 export(QMAKE_EXTRA_COMPILERS)
57 export(generated_files.depends)
62 defineTest(addExtraCompilerWithHeader) {
65 eval(headerFile = $${2})
67 eval($${1}_header.output = $$eval($${1}.output))
68 eval($${1}_header.output ~= s/\.cpp/.h/)
69 eval($${1}_header.output ~= s/\.c/.h/)
71 eval($${1}_header.output = $$headerFile)
74 eval($${1}_header.input = $$eval($${1}.input))
75 eval($${1}_header.commands = @echo -n '')
76 eval($${1}_header.depends = compiler_$${1}_make_all)
77 eval($${1}_header.variable_out = GENERATED_FILES)
79 export($${1}_header.output)
80 export($${1}_header.input)
81 export($${1}_header.commands)
82 export($${1}_header.depends)
83 export($${1}_header.variable_out)
85 !CONFIG(QTDIR_build): QMAKE_EXTRA_COMPILERS += $${1}_header
87 export(QMAKE_EXTRA_COMPILERS)
88 export(generated_files.depends)