Remove QtMultimediaKit - all content has moved to QtMultimedia.
[mirror/qt/qt5.git] / qtwebkit.pri
1 # Wrapper profile for QtWebkit.
2 #
3 # This is needed because webkit builds via a script.
4 # Technically this script is a .pro file, but we name it .pri to avoid clashing
5 # with qt.pro.
6
7 isEmpty(vcproj) {
8     QMAKE_LINK = @: IGNORE THIS LINE
9     OBJECTS_DIR =
10     win32:CONFIG -= embed_manifest_exe
11 } else {
12     CONFIG += console
13     PHONY_DEPS = .
14     phony_src.input = PHONY_DEPS
15     phony_src.output = phony.c
16     phony_src.variable_out = GENERATED_SOURCES
17     phony_src.commands = echo int main() { return 0; } > phony.c
18     phony_src.name = CREATE phony.c
19     phony_src.CONFIG += combine
20     QMAKE_EXTRA_COMPILERS += phony_src
21 }
22
23 DS = $$QMAKE_DIR_SEP
24 contains(DS, /) {
25     env_export = export
26     OPTI=+
27     SBC=$$quote($$QMAKE_CHK_DIR_EXISTS qtwebkit || mkdir qtwebkit &&)
28 } else {
29     env_export = set
30     GNUTOOLS = $$quote("set \"PATH=$$PWD/gnuwin32/bin;%PATH%\" &&")
31 }
32
33 # Any configuration making use of QMAKE_POST_LINK will not work for this project,
34 # since the building is done by webkit's own build script and qmake at this level
35 # does not know the real TARGET.  Disable them here.
36 CONFIG -= separate_debug_info
37
38 exists($$PWD/qtwebkit/WebKitTools):qtwebkit_tools_dir = WebKitTools
39 else:qtwebkit_tools_dir = Tools
40
41 QTWEBKIT_BUILD_CONFIG =
42 contains(CONFIG, release):!contains(CONFIG, debug_and_release): {QTWEBKIT_BUILD_CONFIG = --release}
43
44 # npapi does not work for qpa, as of qtwebkit 81b8dac16049715b94dc36256bd9f433f7dfacc5 .
45 # This should be reverted once npapi either works, or gracefully disables itself, for qpa.
46 qpa:QTWEBKIT_BUILD_CONFIG += --no-netscape-plugin
47
48 # The '+' is to make parallel "make" work across the script boundary.
49 module_qtwebkit.commands = $${OPTI}$${SBC}cd qtwebkit && \
50                            $$env_export \"WEBKITOUTPUTDIR=$$OUT_PWD/qtwebkit/WebKitBuild\" && $$GNUTOOLS \
51                            perl $$PWD$${DS}qtwebkit$${DS}$${qtwebkit_tools_dir}$${DS}Scripts$${DS}build-webkit \
52                                --qt \
53                                --qmake=$(QMAKE) \
54                                --install-libs=$$[QT_INSTALL_LIBS] \
55                                $$QTWEBKIT_BUILD_CONFIG
56 #                               "--makeargs=\"-$(MAKEFLAGS)\""
57 # Trick to force dependency on this rule.
58 #module_qtwebkit.commands += $$escape_expand(\\n)make_default: module-qtwebkit
59 module_qtwebkit.target = module-qtwebkit
60
61 # The '+' is to make parallel "make" work across the script boundary.
62 module_qtwebkit_clean.commands = $${OPTI}$${SBC}cd qtwebkit && \
63                                  $$env_export \"WEBKITOUTPUTDIR=$$OUT_PWD/qtwebkit/WebKitBuild\" && $$GNUTOOLS \
64                                  perl $$PWD$${DS}qtwebkit$${DS}$${qtwebkit_tools_dir}$${DS}Scripts$${DS}build-webkit \
65                                      --qt \
66                                      --qmake=$(QMAKE) \
67                                      --install-libs=$$[QT_INSTALL_LIBS] \
68                                      $$QTWEBKIT_BUILD_CONFIG \
69                                      "--makeargs=\"$(MAKEFLAGS)\"" \
70                                      --clean
71 # Trick to force dependency on this rule.
72 module_qtwebkit_clean.commands += $$escape_expand(\\n)clean: module-qtwebkit-clean
73 module_qtwebkit_clean.target = module-qtwebkit-clean
74
75 module_qtwebkit_install.commands = $${OPTI}$${SBC}cd qtwebkit && \
76                            $$env_export \"WEBKITOUTPUTDIR=$$OUT_PWD/qtwebkit/WebKitBuild\" && $$GNUTOOLS \
77                            perl $$PWD$${DS}qtwebkit$${DS}$${qtwebkit_tools_dir}$${DS}Scripts$${DS}build-webkit \
78                                --qt \
79                                --qmake=$(QMAKE) \
80                                --install-libs=$$[QT_INSTALL_LIBS] \
81                                "--makeargs=\"install\""
82 # Trick to force dependency on this rule.
83 module_qtwebkit_install.commands+= $$escape_expand(\\n)install: module-qtwebkit-install
84 module_qtwebkit_install.target = module-qtwebkit-install
85
86 module_qtwebkit_uninstall.commands = $${OPTI}$${SBC}cd qtwebkit && \
87                            $$env_export \"WEBKITOUTPUTDIR=$$OUT_PWD/qtwebkit/WebKitBuild\" && $$GNUTOOLS \
88                            perl $$PWD$${DS}qtwebkit$${DS}$${qtwebkit_tools_dir}$${DS}Scripts$${DS}build-webkit \
89                                --qt \
90                                --qmake=$(QMAKE) \
91                                --install-libs=$$[QT_INSTALL_LIBS] \
92                                "--makeargs=\"uninstall\""
93 # Trick to force dependency on this rule.
94 module_qtwebkit_uninstall.commands+= $$escape_expand(\\n)uninstall: module-qtwebkit-uninstall
95 module_qtwebkit_uninstall.target = module-qtwebkit-uninstall
96
97 # WebKit needs a nonstandard target because the build has to be initiated by the bundled script.
98 QMAKE_EXTRA_TARGETS += module_qtwebkit module_qtwebkit_clean module_qtwebkit_install module_qtwebkit_uninstall
99 PRE_TARGETDEPS += module-qtwebkit