1 # QtWebKit - qmake build info
2 CONFIG += building-libs
3 CONFIG += depend_includepath
8 DEFINES += BUILDING_WEBKIT
11 $$PWD/../../WebCore/WebCore.qrc
13 CONFIG(debug, debug|release) : CONFIG_DIR = debug
14 else: CONFIG_DIR = release
16 SOURCE_DIR = $$replace(PWD, /WebKit/qt, "")
18 include($$PWD/Api/headers.pri)
19 include($$SOURCE_DIR/WebKit.pri)
20 include($$SOURCE_DIR/JavaScriptCore/JavaScriptCore.pri)
22 include($$SOURCE_DIR/WebKit2/WebKit2.pri)
23 include($$SOURCE_DIR/WebKit2/WebKit2API.pri)
25 include($$SOURCE_DIR/WebCore/WebCore.pri)
27 !v8:prependJavaScriptCoreLib(../../JavaScriptCore)
28 prependWebCoreLib(../../WebCore)
29 webkit2:prependWebKit2Lib(../../WebKit2)
31 # This is needed for syncqt when it parses the dependencies on module's main pro file so
32 # the generated includes are containing the dependencies.
33 # It used to be in WebCore.pro but now that this is the main pro file it has to be here.
36 isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
38 contains(QT_CONFIG, embedded):CONFIG += embedded
41 # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
42 contains(DEFINES, ENABLE_WEBGL=1)|contains(CONFIG, texmap): LIBS += $$QMAKE_LIBS_OPENGL
45 include_webinspector: RESOURCES += $$SOURCE_DIR/WebCore/inspector/front-end/WebKit.qrc $$WC_GENERATED_SOURCES_DIR/InspectorBackendStub.qrc
47 # Extract sources to build from the generator definitions
48 defineTest(addExtraCompiler) {
49 isEqual($${1}.wkAddOutputToSources, false): return(true)
51 outputRule = $$eval($${1}.output)
52 input = $$eval($${1}.input)
53 input = $$eval($$input)
56 base = $$basename(file)
58 newfile=$$replace(outputRule,\\$\\{QMAKE_FILE_BASE\\},$$base)
61 SOURCES += $$eval($${1}.wkExtraSources)
67 include($$SOURCE_DIR/WebCore/CodeGenerators.pri)
69 CONFIG(release):!CONFIG(standalone_package) {
70 contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
71 unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
75 include($$QT_SOURCE_TREE/src/qbase.pri)
76 # The following lines are to prevent qmake from adding the jscore, webcore and webkit2 libs to libQtWebKit's prl dependencies.
77 # The compromise we have to accept by disabling explicitlib is to drop support to link QtWebKit and QtScript
78 # statically in applications (which isn't used often because, among other things, of licensing obstacles).
82 DESTDIR = $$OUTPUT_DIR/lib
83 symbian: TARGET =$$TARGET$${QT_LIBINFIX}
86 moduleFile=$$PWD/qt_webkit_version.pri
87 isEmpty(QT_BUILD_TREE):include($$moduleFile)
88 VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION}
91 TARGET.EPOCALLOWDLLDATA=1
92 # DRM and Allfiles capabilites need to be audited to be signed on Symbian
93 # For regular users that is not possible, so use the CONFIG(production) flag is added
94 # To use all capabilies add CONFIG+=production
95 # If building from QT source tree, also add CONFIG-=QTDIR_build as qbase.pri defaults capabilities to All -Tcb.
97 TARGET.CAPABILITY = All -Tcb
99 TARGET.CAPABILITY = All -Tcb -DRM -AllFiles
101 isEmpty(QT_LIBINFIX) {
102 TARGET.UID3 = 0x200267C2
104 TARGET.UID3 = 0xE00267C2
107 sisheader = "; SIS header: name, uid, version" \
108 "$${LITERAL_HASH}{\"$$TARGET\"},($$TARGET.UID3),$$QT_WEBKIT_MAJOR_VERSION,$$QT_WEBKIT_MINOR_VERSION,$$QT_WEBKIT_PATCH_VERSION,TYPE=SA,RU"
109 webkitsisheader.pkg_prerules = sisheader
111 webkitlibs.sources = QtWebKit$${QT_LIBINFIX}.dll
112 v8:webkitlibs.sources += v8.dll
114 CONFIG(QTDIR_build): webkitlibs.sources = $$QMAKE_LIBDIR_QT/$$webkitlibs.sources
115 webkitlibs.path = /sys/bin
117 "; Localised Vendor name" \
120 "; Unique Vendor name" \
123 webkitlibs.pkg_prerules = vendorinfo
125 webkitbackup.sources = symbian/backup_registration.xml
126 webkitbackup.path = /private/10202d56/import/packages/$$replace(TARGET.UID3, 0x,)
128 contains(QT_CONFIG, declarative) {
129 declarativeImport.sources = $$QT_BUILD_TREE/imports/QtWebKit/qmlwebkitplugin$${QT_LIBINFIX}.dll
130 declarativeImport.sources += declarative/qmldir
131 declarativeImport.path = c:$$QT_IMPORTS_BASE_DIR/QtWebKit
132 DEPLOYMENT += declarativeImport
135 platformplugin.sources = $$OUTPUT_DIR/plugins/QtWebKit/platformplugin$${QT_LIBINFIX}.dll
136 platformplugin.path = c:$$QT_PLUGINS_BASE_DIR/QtWebKit
138 DEPLOYMENT += webkitsisheader webkitlibs webkitbackup platformplugin
139 !CONFIG(production):CONFIG-=def_files
141 # Need to build these sources here because of exported symbols
143 $$SOURCE_DIR/WebCore/plugins/symbian/PluginViewSymbian.cpp \
144 $$SOURCE_DIR/WebCore/plugins/symbian/PluginContainerSymbian.cpp
147 $$SOURCE_DIR/WebCore/plugins/symbian/PluginContainerSymbian.h \
148 $$SOURCE_DIR/WebCore/plugins/symbian/npinterface.h
151 !static: DEFINES += QT_MAKEDLL
154 $$PWD/Api/qwebframe.cpp \
155 $$PWD/Api/qgraphicswebview.cpp \
156 $$PWD/Api/qwebpage.cpp \
157 $$PWD/Api/qwebview.cpp \
158 $$PWD/Api/qwebelement.cpp \
159 $$PWD/Api/qwebhistory.cpp \
160 $$PWD/Api/qwebsettings.cpp \
161 $$PWD/Api/qwebhistoryinterface.cpp \
162 $$PWD/Api/qwebplugindatabase.cpp \
163 $$PWD/Api/qwebpluginfactory.cpp \
164 $$PWD/Api/qwebsecurityorigin.cpp \
165 $$PWD/Api/qwebscriptworld.cpp \
166 $$PWD/Api/qwebdatabase.cpp \
167 $$PWD/Api/qwebinspector.cpp \
168 $$PWD/Api/qwebkitversion.cpp \
170 $$PWD/WebCoreSupport/QtFallbackWebPopup.cpp \
171 $$PWD/WebCoreSupport/ChromeClientQt.cpp \
172 $$PWD/WebCoreSupport/ContextMenuClientQt.cpp \
173 $$PWD/WebCoreSupport/DragClientQt.cpp \
174 $$PWD/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
175 $$PWD/WebCoreSupport/EditorClientQt.cpp \
176 $$PWD/WebCoreSupport/EditCommandQt.cpp \
177 $$PWD/WebCoreSupport/FrameLoaderClientQt.cpp \
178 $$PWD/WebCoreSupport/FrameNetworkingContextQt.cpp \
179 $$PWD/WebCoreSupport/GeolocationPermissionClientQt.cpp \
180 $$PWD/WebCoreSupport/InspectorClientQt.cpp \
181 $$PWD/WebCoreSupport/InspectorServerQt.cpp \
182 $$PWD/WebCoreSupport/NotificationPresenterClientQt.cpp \
183 $$PWD/WebCoreSupport/PageClientQt.cpp \
184 $$PWD/WebCoreSupport/PopupMenuQt.cpp \
185 $$PWD/WebCoreSupport/QtPlatformPlugin.cpp \
186 $$PWD/WebCoreSupport/SearchPopupMenuQt.cpp \
187 $$PWD/WebCoreSupport/WebPlatformStrategies.cpp
190 $$WEBKIT_API_HEADERS \
191 $$PWD/Api/qwebplugindatabase_p.h \
193 $$PWD/WebCoreSupport/InspectorServerQt.h \
194 $$PWD/WebCoreSupport/QtFallbackWebPopup.h \
195 $$PWD/WebCoreSupport/FrameLoaderClientQt.h \
196 $$PWD/WebCoreSupport/FrameNetworkingContextQt.h \
197 $$PWD/WebCoreSupport/GeolocationPermissionClientQt.h \
198 $$PWD/WebCoreSupport/NotificationPresenterClientQt.h \
199 $$PWD/WebCoreSupport/PageClientQt.h \
200 $$PWD/WebCoreSupport/QtPlatformPlugin.h \
201 $$PWD/WebCoreSupport/PopupMenuQt.h \
202 $$PWD/WebCoreSupport/SearchPopupMenuQt.h \
203 $$PWD/WebCoreSupport/WebPlatformStrategies.h
206 HEADERS += $$WEBKIT2_API_HEADERS
207 SOURCES += $$WEBKIT2_API_SOURCES
210 contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
213 HEADERS += $$PWD/WebCoreSupport/QtMaemoWebPopup.h
214 SOURCES += $$PWD/WebCoreSupport/QtMaemoWebPopup.cpp
219 contains(DEFINES, ENABLE_VIDEO=1) {
220 !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
221 HEADERS += $$PWD/WebCoreSupport/FullScreenVideoWidget.h
222 SOURCES += $$PWD/WebCoreSupport/FullScreenVideoWidget.cpp
225 contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
226 HEADERS += $$PWD/WebCoreSupport/FullScreenVideoQt.h
227 SOURCES += $$PWD/WebCoreSupport/FullScreenVideoQt.cpp
230 contains(DEFINES, WTF_USE_QTKIT=1) {
231 INCLUDEPATH += $$SOURCE_DIR/WebCore/platform/qt/ \
232 $$SOURCE_DIR/WebCore/platform/mac/ \
233 $$SOURCE_DIR/../WebKitLibraries/
235 DEFINES+=NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
236 contains(CONFIG, "x86") {
237 DEFINES+=NS_BUILD_32_LIKE_64
240 HEADERS += $$PWD/WebCoreSupport/WebSystemInterface.h \
241 $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.h
243 OBJECTIVE_SOURCES += $$PWD/WebCoreSupport/WebSystemInterface.mm \
244 $$PWD/WebCoreSupport/QTKitFullScreenVideoHandler.mm
246 LIBS+= -framework Security -framework IOKit
247 # We can know the Mac OS version by using the Darwin major version
248 DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
249 DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
250 equals(DARWIN_MAJOR_VERSION, "9") | contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.5.sdk") {
251 LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLeopard.a
252 } else: equals(DARWIN_MAJOR_VERSION, "10") | contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.6.sdk") {
253 LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
254 } else: equals(DARWIN_MAJOR_VERSION, "11") | contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.7.sdk") {
255 LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLion.a
260 contains(DEFINES, ENABLE_ICONDATABASE=1) {
262 $$SOURCE_DIR/WebCore/loader/icon/IconDatabaseClient.h \
263 $$PWD/WebCoreSupport/IconDatabaseClientQt.h
266 $$PWD/WebCoreSupport/IconDatabaseClientQt.cpp
269 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
271 $$PWD/WebCoreSupport/DeviceMotionClientQt.h \
272 $$PWD/WebCoreSupport/DeviceMotionProviderQt.h \
273 $$PWD/WebCoreSupport/DeviceOrientationClientQt.h \
274 $$PWD/WebCoreSupport/DeviceOrientationClientMockQt.h \
275 $$PWD/WebCoreSupport/DeviceOrientationProviderQt.h
278 $$PWD/WebCoreSupport/DeviceMotionClientQt.cpp \
279 $$PWD/WebCoreSupport/DeviceMotionProviderQt.cpp \
280 $$PWD/WebCoreSupport/DeviceOrientationClientQt.cpp \
281 $$PWD/WebCoreSupport/DeviceOrientationClientMockQt.cpp \
282 $$PWD/WebCoreSupport/DeviceOrientationProviderQt.cpp
285 contains(DEFINES, ENABLE_GEOLOCATION=1) {
287 $$PWD/WebCoreSupport/GeolocationClientQt.h
289 $$PWD/WebCoreSupport/GeolocationClientQt.cpp
292 contains(CONFIG, texmap) {
293 DEFINES += WTF_USE_TEXTURE_MAPPER=1
296 !symbian-abld:!symbian-sbsv2 {
297 modfile.files = $$moduleFile
298 modfile.path = $$[QMAKE_MKSPECS]/modules
302 # INSTALLS is not implemented in qmake's mmp generators, copy headers manually
304 inst_modfile.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
305 inst_modfile.input = moduleFile
306 inst_modfile.output = $$[QMAKE_MKSPECS]/modules
307 inst_modfile.CONFIG = no_clean
309 QMAKE_EXTRA_COMPILERS += inst_modfile
311 install.depends += compiler_inst_modfile_make_all
312 QMAKE_EXTRA_TARGETS += install
315 !CONFIG(QTDIR_build) {
316 exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri)
317 WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS
319 !symbian-abld:!symbian-sbsv2 {
320 headers.files = $$WEBKIT_INSTALL_HEADERS
322 !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit
323 else: headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit
325 !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
326 else: target.path = $$[QT_INSTALL_LIBS]
328 INSTALLS += target headers
330 # INSTALLS is not implemented in qmake's mmp generators, copy headers manually
331 inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
332 inst_headers.input = WEBKIT_INSTALL_HEADERS
333 inst_headers.CONFIG = no_clean no_link target_predeps
335 !isEmpty(INSTALL_HEADERS): inst_headers.output = $$INSTALL_HEADERS/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
336 else: inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
338 QMAKE_EXTRA_COMPILERS += inst_headers
340 install.depends += compiler_inst_headers_make_all
344 CONFIG += create_pc create_prl
345 QMAKE_PKGCONFIG_LIBDIR = $$target.path
346 QMAKE_PKGCONFIG_INCDIR = $$headers.path
347 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
348 lib_replace.match = $$re_escape($$DESTDIR)
349 lib_replace.replace = $$[QT_INSTALL_LIBS]
350 QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
354 !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
356 message("Building QtWebKit as a framework, as that's how Qt was built. You can")
357 message("override this by passing CONFIG+=webkit_no_framework to build-webkit.")
361 isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
364 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
365 FRAMEWORK_HEADERS.version = Versions
366 FRAMEWORK_HEADERS.files = $${headers.files}
367 FRAMEWORK_HEADERS.path = Headers
368 QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
371 QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}"
377 contains(CONFIG, def_files) {
379 # defFilePath is for Qt4.6 compatibility
382 MMP_RULES += EXPORTUNFROZEN