1 # -------------------------------------------------------------------
2 # Project file for the QtWebKit C++ APIs
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
10 DESTDIR = $${ROOT_BUILD_DIR}/lib
12 runSyncQt() # Generate forwarding headers for the QtWebKit API
16 include(WebKit/WebKit.pri)
20 !v8:CONFIG += javascriptcore
28 # Ensure that changes to the WebKit2 API will trigger a qmake of this
29 # file, which in turn runs syncqt to update the forwarding headers.
30 QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
34 haveQt(5): QT += widgets printsupport
37 # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
38 contains(DEFINES, ENABLE_WEBGL=1)|contains(CONFIG, texmap): LIBS += $$QMAKE_LIBS_OPENGL
41 !static: DEFINES += QT_MAKEDLL
44 $$PWD/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
45 $$PWD/WebKit/qt/WebCoreSupport/QtWebComboBox.cpp \
46 $$PWD/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp \
47 $$PWD/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp \
48 $$PWD/WebKit/qt/WebCoreSupport/DragClientQt.cpp \
49 $$PWD/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
50 $$PWD/WebKit/qt/WebCoreSupport/EditorClientQt.cpp \
51 $$PWD/WebKit/qt/WebCoreSupport/EditCommandQt.cpp \
52 $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
53 $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
54 $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
55 $$PWD/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp \
56 $$PWD/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp \
57 $$PWD/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp \
58 $$PWD/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \
59 $$PWD/WebKit/qt/WebCoreSupport/PageClientQt.cpp \
60 $$PWD/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp \
61 $$PWD/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp \
62 $$PWD/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.cpp \
63 $$PWD/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp \
64 $$PWD/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
67 $$PWD/WebKit/qt/WebCoreSupport/InitWebCoreQt.h \
68 $$PWD/WebKit/qt/WebCoreSupport/InspectorServerQt.h \
69 $$PWD/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \
70 $$PWD/WebKit/qt/WebCoreSupport/QtWebComboBox.h \
71 $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
72 $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h \
73 $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h \
74 $$PWD/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h \
75 $$PWD/WebKit/qt/WebCoreSupport/PageClientQt.h \
76 $$PWD/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h \
77 $$PWD/WebKit/qt/WebCoreSupport/PopupMenuQt.h \
78 $$PWD/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.h \
79 $$PWD/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h \
80 $$PWD/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h
82 contains(DEFINES, ENABLE_VIDEO=1) {
83 !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
84 HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.h
85 SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.cpp
88 contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
89 HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
90 SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
93 contains(DEFINES, WTF_USE_QTKIT=1) {
95 $$PWD/WebCore/platform/qt/ \
96 $$PWD/WebCore/platform/mac/ \
97 $$PWD/../WebKitLibraries/
99 DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
101 contains(CONFIG, "x86") {
102 DEFINES+=NS_BUILD_32_LIKE_64
106 $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.h \
107 $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h
109 OBJECTIVE_SOURCES += \
110 $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.mm \
111 $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm
113 LIBS += -framework Security -framework IOKit
115 # We can know the Mac OS version by using the Darwin major version
116 DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
117 DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
118 equals(DARWIN_MAJOR_VERSION, "11") {
119 LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
120 } else:equals(DARWIN_MAJOR_VERSION, "10") {
121 LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
122 } else:equals(DARWIN_MAJOR_VERSION, "9") {
123 LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
128 contains(DEFINES, ENABLE_ICONDATABASE=1) {
130 $$PWD/WebCore/loader/icon/IconDatabaseClient.h \
131 $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
134 $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.cpp
137 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
139 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
140 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h \
141 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h \
142 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.h \
143 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
146 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp \
147 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp \
148 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp \
149 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientMockQt.cpp \
150 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
153 contains(DEFINES, ENABLE_GEOLOCATION=1) {
154 haveQt(5): QT += location
157 $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
159 $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
162 contains(CONFIG, texmap) {
163 DEFINES += WTF_USE_TEXTURE_MAPPER=1
167 # ------------- Install rules -------------
169 modulefile.files = $$QT.webkit.modulefile
170 mkspecs = $$[QMAKE_MKSPECS]
171 mkspecs = $$split(mkspecs, :)
172 modulefile.path = $$last(mkspecs)/modules
173 INSTALLS += modulefile
175 # Syncqt has already run at this point, so we can use headers.pri
176 # as a basis for our install-rules
177 HEADERS_PRI = $${ROOT_BUILD_DIR}/include/$$TARGET/headers.pri
178 !include($$HEADERS_PRI): error(Failed to resolve install headers)
180 headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
181 !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/$${TARGET}
182 else: headers.path = $$[QT_INSTALL_HEADERS]/$${TARGET}
185 !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
186 else: target.path = $$[QT_INSTALL_LIBS]
190 CONFIG += create_pc create_prl
191 QMAKE_PKGCONFIG_LIBDIR = $$target.path
192 QMAKE_PKGCONFIG_INCDIR = $$headers.path
193 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
194 lib_replace.match = $$re_escape($$DESTDIR)
195 lib_replace.replace = $$[QT_INSTALL_LIBS]
196 QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
200 !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
202 message("Building QtWebKit as a framework, as that's how Qt was built. You can")
203 message("override this by passing CONFIG+=webkit_no_framework to build-webkit.")
205 isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
208 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
210 # For debug_and_release configs, only copy headers in release
211 !debug_and_release|if(build_pass:CONFIG(release, debug|release)) {
212 FRAMEWORK_HEADERS.version = Versions
213 FRAMEWORK_HEADERS.files = $${headers.files}
214 FRAMEWORK_HEADERS.path = Headers
215 QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
219 QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}"
222 plugin_backend_xlib {
223 CONFIG *= link_pkgconfig
228 PRE_TARGETDEPS += $$PWD/qtwebkit-export.map
229 QMAKE_LFLAGS += -Wl,--version-script=$$PWD/qtwebkit-export.map