1 # QtWebKit - qmake build info
2 CONFIG += building-libs
3 CONFIG += depend_includepath
8 DEFINES += BUILDING_WEBKIT
10 webkit2: QT += declarative
13 $$PWD/../../WebCore/WebCore.qrc
15 CONFIG(debug, debug|release) : CONFIG_DIR = debug
16 else: CONFIG_DIR = release
18 SOURCE_DIR = $$replace(PWD, /WebKit/qt, "")
20 include($$PWD/Api/headers.pri)
21 include($$SOURCE_DIR/WebKit.pri)
22 include($$SOURCE_DIR/JavaScriptCore/JavaScriptCore.pri)
24 include($$SOURCE_DIR/WebKit2/WebKit2.pri)
25 include($$SOURCE_DIR/WebKit2/WebKit2API.pri)
27 include($$SOURCE_DIR/WebCore/WebCore.pri)
31 QMAKE_LIBDIR += $${V8_LIB_DIR}
36 !v8:prependJavaScriptCoreLib(../../JavaScriptCore)
37 prependWebCoreLib(../../WebCore)
38 webkit2:prependWebKit2Lib(../../WebKit2)
40 # This is needed for syncqt when it parses the dependencies on module's main pro file so
41 # the generated includes are containing the dependencies.
42 # It used to be in WebCore.pro but now that this is the main pro file it has to be here.
45 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
47 contains(QT_CONFIG, embedded):CONFIG += embedded
50 # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
51 contains(DEFINES, ENABLE_WEBGL=1)|contains(CONFIG, texmap): LIBS += $$QMAKE_LIBS_OPENGL
54 include_webinspector: RESOURCES += $$SOURCE_DIR/WebCore/inspector/front-end/WebKit.qrc $$WC_GENERATED_SOURCES_DIR/InspectorBackendStub.qrc
56 # Extract sources to build from the generator definitions
57 defineTest(addExtraCompiler) {
58 isEqual($${1}.wkAddOutputToSources, false): return(true)
60 outputRule = $$eval($${1}.output)
61 input = $$eval($${1}.input)
62 input = $$eval($$input)
65 base = $$basename(file)
67 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
70 SOURCES += $$eval($${1}.wkExtraSources)
76 include($$SOURCE_DIR/WebCore/CodeGenerators.pri)
78 CONFIG(release):!CONFIG(standalone_package) {
79 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
80 unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
84 include($$QT_SOURCE_TREE/src/qbase.pri)
85 # The following lines are to prevent qmake from adding the jscore, webcore and webkit2 libs to libQtWebKit's prl dependencies.
86 # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit and QtScript
87 # statically in applications (which isn't used often because, among other things, of licensing obstacles).
91 DESTDIR = $$OUTPUT_DIR/lib
92 symbian: TARGET =$$TARGET$${QT_LIBINFIX}
95 moduleFile=$$PWD/qt_webkit_version.pri
96 isEmpty(QT_BUILD_TREE):include($$moduleFile)
97 VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION}
100 TARGET.EPOCALLOWDLLDATA=1
101 # DRM and Allfiles capabilites need to be audited to be signed on Symbian
102 # For regular users that is not possible, so use the CONFIG(production) flag is added
103 # To use all capabilies add CONFIG+=production
104 # If building from QT source tree, also add CONFIG-=QTDIR_build as qbase.pri defaults capabilities to All -Tcb.
106 TARGET.CAPABILITY = All -Tcb
108 TARGET.CAPABILITY = All -Tcb -DRM -AllFiles
110 isEmpty(QT_LIBINFIX) {
111 TARGET.UID3 = 0x200267C2
113 TARGET.UID3 = 0xE00267C2
116 sisheader = "; SIS header: name, uid, version" \
117 "$${LITERAL_HASH}{\"$$TARGET\"},($$TARGET.UID3),$$QT_WEBKIT_MAJOR_VERSION,$$QT_WEBKIT_MINOR_VERSION,$$QT_WEBKIT_PATCH_VERSION,TYPE=SA,RU"
118 webkitsisheader.pkg_prerules = sisheader
120 webkitlibs.sources = QtWebKit$${QT_LIBINFIX}.dll
121 v8:webkitlibs.sources += v8.dll
123 CONFIG(QTDIR_build): webkitlibs.sources = $$QMAKE_LIBDIR_QT/$$webkitlibs.sources
124 webkitlibs.path = /sys/bin
126 "; Localised Vendor name" \
129 "; Unique Vendor name" \
132 webkitlibs.pkg_prerules = vendorinfo
134 webkitbackup.sources = symbian/backup_registration.xml
135 webkitbackup.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
137 contains(QT_CONFIG, declarative) {
138 declarativeImport.sources = $$QT_BUILD_TREE/imports/QtWebKit/qmlwebkitplugin$${QT_LIBINFIX}.dll
139 declarativeImport.sources += declarative/qmldir
140 declarativeImport.path = c:$$QT_IMPORTS_BASE_DIR/QtWebKit
141 DEPLOYMENT += declarativeImport
144 platformplugin.sources = $$OUTPUT_DIR/plugins/QtWebKit/platformplugin$${QT_LIBINFIX}.dll
145 platformplugin.path = c:$$QT_PLUGINS_BASE_DIR/QtWebKit
147 DEPLOYMENT += webkitsisheader webkitlibs webkitbackup platformplugin
148 !CONFIG(production):CONFIG-=def_files
150 # Need to build these sources here because of exported symbols
152 $$SOURCE_DIR/WebCore/plugins/symbian/PluginViewSymbian.cpp \
153 $$SOURCE_DIR/WebCore/plugins/symbian/PluginContainerSymbian.cpp
156 $$SOURCE_DIR/WebCore/plugins/symbian/PluginContainerSymbian.h \
157 $$SOURCE_DIR/WebCore/plugins/symbian/npinterface.h
160 !static: DEFINES += QT_MAKEDLL
163 $$PWD/Api/qwebframe.cpp \
164 $$PWD/Api/qgraphicswebview.cpp \
165 $$PWD/Api/qwebpage.cpp \
166 $$PWD/Api/qwebview.cpp \
167 $$PWD/Api/qwebelement.cpp \
168 $$PWD/Api/qwebhistory.cpp \
169 $$PWD/Api/qwebsettings.cpp \
170 $$PWD/Api/qwebhistoryinterface.cpp \
171 $$PWD/Api/qwebplugindatabase.cpp \
172 $$PWD/Api/qwebpluginfactory.cpp \
173 $$PWD/Api/qwebsecurityorigin.cpp \
174 $$PWD/Api/qwebscriptworld.cpp \
175 $$PWD/Api/qwebdatabase.cpp \
176 $$PWD/Api/qwebinspector.cpp \
177 $$PWD/Api/qwebkitversion.cpp \
179 $$PWD/WebCoreSupport/QtFallbackWebPopup.cpp \
180 $$PWD/WebCoreSupport/QtWebComboBox.cpp \
181 $$PWD/WebCoreSupport/ChromeClientQt.cpp \
182 $$PWD/WebCoreSupport/ContextMenuClientQt.cpp \
183 $$PWD/WebCoreSupport/DragClientQt.cpp \
184 $$PWD/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
185 $$PWD/WebCoreSupport/EditorClientQt.cpp \
186 $$PWD/WebCoreSupport/EditCommandQt.cpp \
187 $$PWD/WebCoreSupport/FrameLoaderClientQt.cpp \
188 $$PWD/WebCoreSupport/FrameNetworkingContextQt.cpp \
189 $$PWD/WebCoreSupport/GeolocationPermissionClientQt.cpp \
190 $$PWD/WebCoreSupport/InspectorClientQt.cpp \
191 $$PWD/WebCoreSupport/InspectorServerQt.cpp \
192 $$PWD/WebCoreSupport/NotificationPresenterClientQt.cpp \
193 $$PWD/WebCoreSupport/PageClientQt.cpp \
194 $$PWD/WebCoreSupport/PopupMenuQt.cpp \
195 $$PWD/WebCoreSupport/QtPlatformPlugin.cpp \
196 $$PWD/WebCoreSupport/SearchPopupMenuQt.cpp \
197 $$PWD/WebCoreSupport/TextCheckerClientQt.cpp \
198 $$PWD/WebCoreSupport/WebPlatformStrategies.cpp
201 $$WEBKIT_API_HEADERS \
202 $$PWD/Api/qwebplugindatabase_p.h \
204 $$PWD/WebCoreSupport/InspectorServerQt.h \
205 $$PWD/WebCoreSupport/QtFallbackWebPopup.h \
206 $$PWD/WebCoreSupport/QtWebComboBox.h \
207 $$PWD/WebCoreSupport/FrameLoaderClientQt.h \
208 $$PWD/WebCoreSupport/FrameNetworkingContextQt.h \
209 $$PWD/WebCoreSupport/GeolocationPermissionClientQt.h \
210 $$PWD/WebCoreSupport/NotificationPresenterClientQt.h \
211 $$PWD/WebCoreSupport/PageClientQt.h \
212 $$PWD/WebCoreSupport/QtPlatformPlugin.h \
213 $$PWD/WebCoreSupport/PopupMenuQt.h \
214 $$PWD/WebCoreSupport/SearchPopupMenuQt.h \
215 $$PWD/WebCoreSupport/TextCheckerClientQt.h \
216 $$PWD/WebCoreSupport/WebPlatformStrategies.h
219 HEADERS += $$WEBKIT2_API_HEADERS
220 SOURCES += $$WEBKIT2_API_SOURCES
223 contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
226 HEADERS += $$PWD/WebCoreSupport/QtMaemoWebPopup.h
227 SOURCES += $$PWD/WebCoreSupport/QtMaemoWebPopup.cpp
232 contains(DEFINES, ENABLE_VIDEO=1) {
233 !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
234 HEADERS += $$PWD/WebCoreSupport/FullScreenVideoWidget.h
235 SOURCES += $$PWD/WebCoreSupport/FullScreenVideoWidget.cpp
238 contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
239 HEADERS += $$PWD/WebCoreSupport/FullScreenVideoQt.h
240 SOURCES += $$PWD/WebCoreSupport/FullScreenVideoQt.cpp
243 contains(DEFINES, WTF_USE_QTKIT=1) {
244 INCLUDEPATH += $$SOURCE_DIR/WebCore/platform/qt/ \
245 $$SOURCE_DIR/WebCore/platform/mac/ \
246 $$SOURCE_DIR/../WebKitLibraries/
248 DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
250 HEADERS += $$PWD/WebCoreSupport/WebSystemInterface.h \
251 $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.h
253 OBJECTIVE_SOURCES += $$PWD/WebCoreSupport/WebSystemInterface.mm \
254 $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.mm
256 LIBS+= -framework Security -framework IOKit
257 # We can know the Mac OS version by using the Darwin major version
258 DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
259 DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
260 equals(DARWIN_MAJOR_VERSION, "11") {
261 LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLion.a
262 } else:equals(DARWIN_MAJOR_VERSION, "10") {
263 LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
264 } else:equals(DARWIN_MAJOR_VERSION, "9") {
265 LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLeopard.a
270 contains(DEFINES, ENABLE_ICONDATABASE=1) {
272 $$SOURCE_DIR/WebCore/loader/icon/IconDatabaseClient.h \
273 $$PWD/WebCoreSupport/IconDatabaseClientQt.h
276 $$PWD/WebCoreSupport/IconDatabaseClientQt.cpp
279 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
281 $$PWD/WebCoreSupport/DeviceMotionClientQt.h \
282 $$PWD/WebCoreSupport/DeviceMotionProviderQt.h \
283 $$PWD/WebCoreSupport/DeviceOrientationClientQt.h \
284 $$PWD/WebCoreSupport/DeviceOrientationClientMockQt.h \
285 $$PWD/WebCoreSupport/DeviceOrientationProviderQt.h
288 $$PWD/WebCoreSupport/DeviceMotionClientQt.cpp \
289 $$PWD/WebCoreSupport/DeviceMotionProviderQt.cpp \
290 $$PWD/WebCoreSupport/DeviceOrientationClientQt.cpp \
291 $$PWD/WebCoreSupport/DeviceOrientationClientMockQt.cpp \
292 $$PWD/WebCoreSupport/DeviceOrientationProviderQt.cpp
295 contains(DEFINES, ENABLE_GEOLOCATION=1) {
297 $$PWD/WebCoreSupport/GeolocationClientQt.h
299 $$PWD/WebCoreSupport/GeolocationClientQt.cpp
302 contains(CONFIG, texmap) {
303 DEFINES += WTF_USE_TEXTURE_MAPPER=1
306 !symbian-abld:!symbian-sbsv2 {
307 modfile.files = $$moduleFile
308 modfile.path = $$[QMAKE_MKSPECS]/modules
312 # INSTALLS is not implemented in qmake's mmp generators, copy headers manually
314 inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
315 inst_modfile.input = moduleFile
316 inst_modfile.output = $$[QMAKE_MKSPECS]/modules
317 inst_modfile.CONFIG = no_clean
319 QMAKE_EXTRA_COMPILERS += inst_modfile
321 install.depends += compiler_inst_modfile_make_all
322 QMAKE_EXTRA_TARGETS += install
325 !CONFIG(QTDIR_build) {
326 exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri)
327 WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS
329 !symbian-abld:!symbian-sbsv2 {
330 headers.files = $$WEBKIT_INSTALL_HEADERS
332 !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit
333 else: headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
335 !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
336 else: target.path = $$[QT_INSTALL_LIBS]
338 INSTALLS += target headers
340 # INSTALLS is not implemented in qmake's mmp generators, copy headers manually
341 inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
342 inst_headers.input = WEBKIT_INSTALL_HEADERS
343 inst_headers.CONFIG = no_clean no_link target_predeps
345 !isEmpty(INSTALL_HEADERS): inst_headers.output = $$INSTALL_HEADERS/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
346 else: inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
348 QMAKE_EXTRA_COMPILERS += inst_headers
350 install.depends += compiler_inst_headers_make_all
354 CONFIG += create_pc create_prl
355 QMAKE_PKGCONFIG_LIBDIR = $$target.path
356 QMAKE_PKGCONFIG_INCDIR = $$headers.path
357 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
358 lib_replace.match = $$re_escape($$DESTDIR)
359 lib_replace.replace = $$[QT_INSTALL_LIBS]
360 QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
364 !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
366 message("Building QtWebKit as a framework, as that's how Qt was built. You can")
367 message("override this by passing CONFIG+=webkit_no_framework to build-webkit.")
371 isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
374 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
375 FRAMEWORK_HEADERS.version = Versions
376 FRAMEWORK_HEADERS.files = $${headers.files}
377 FRAMEWORK_HEADERS.path = Headers
378 QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
381 QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}"
387 contains(CONFIG, def_files) {
389 # defFilePath is for Qt4.6 compatibility
392 MMP_RULES += EXPORTUNFROZEN