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/UndoStepQt.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
84 $$PWD/WebKit/qt/WebCoreSupport
86 contains(DEFINES, ENABLE_VIDEO=1) {
87 !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
88 HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.h
89 SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.cpp
92 contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
93 HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
94 SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
97 contains(DEFINES, WTF_USE_QTKIT=1) {
99 $$PWD/WebCore/platform/qt/ \
100 $$PWD/WebCore/platform/mac/ \
101 $$PWD/../WebKitLibraries/
103 DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
105 contains(CONFIG, "x86") {
106 DEFINES+=NS_BUILD_32_LIKE_64
110 $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.h \
111 $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h
113 OBJECTIVE_SOURCES += \
114 $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.mm \
115 $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm
117 LIBS += -framework Security -framework IOKit
119 # We can know the Mac OS version by using the Darwin major version
120 DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
121 DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
122 equals(DARWIN_MAJOR_VERSION, "11") {
123 LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
124 } else:equals(DARWIN_MAJOR_VERSION, "10") {
125 LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
126 } else:equals(DARWIN_MAJOR_VERSION, "9") {
127 LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
132 contains(DEFINES, ENABLE_ICONDATABASE=1) {
134 $$PWD/WebCore/loader/icon/IconDatabaseClient.h \
135 $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
138 $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.cpp
141 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) || contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
142 haveQt(5): QT += sensors
145 contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) {
147 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h \
148 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h \
149 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h \
150 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
153 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp \
154 $$PWD/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp \
155 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp \
156 $$PWD/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
159 contains(DEFINES, ENABLE_GEOLOCATION=1) {
160 haveQt(5): QT += location
163 $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
165 $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
168 contains(CONFIG, texmap) {
169 DEFINES += WTF_USE_TEXTURE_MAPPER=1
173 # ------------- Install rules -------------
175 modulefile.files = $$QT.webkit.modulefile
176 mkspecs = $$[QMAKE_MKSPECS]
177 mkspecs = $$split(mkspecs, :)
178 modulefile.path = $$last(mkspecs)/modules
179 INSTALLS += modulefile
181 # Syncqt has already run at this point, so we can use headers.pri
182 # as a basis for our install-rules
183 HEADERS_PRI = $${ROOT_BUILD_DIR}/include/$$TARGET/headers.pri
184 !include($$HEADERS_PRI): error(Failed to resolve install headers)
186 headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
187 !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/$${TARGET}
188 else: headers.path = $$[QT_INSTALL_HEADERS]/$${TARGET}
191 !isEmpty(INSTALL_LIBS): target.path = $$INSTALL_LIBS
192 else: target.path = $$[QT_INSTALL_LIBS]
196 CONFIG += create_pc create_prl
197 QMAKE_PKGCONFIG_LIBDIR = $$target.path
198 QMAKE_PKGCONFIG_INCDIR = $$headers.path
199 QMAKE_PKGCONFIG_DESTDIR = pkgconfig
200 lib_replace.match = $$re_escape($$DESTDIR)
201 lib_replace.replace = $$[QT_INSTALL_LIBS]
202 QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace
206 !static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
208 message("Building QtWebKit as a framework, as that's how Qt was built. You can")
209 message("override this by passing CONFIG+=webkit_no_framework to build-webkit.")
211 isEmpty(QT_SOURCE_TREE):debug_and_release:TARGET = $$qtLibraryTarget($$TARGET)
214 CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
216 # For debug_and_release configs, only copy headers in release
217 !debug_and_release|if(build_pass:CONFIG(release, debug|release)) {
218 FRAMEWORK_HEADERS.version = Versions
219 FRAMEWORK_HEADERS.files = $${headers.files}
220 FRAMEWORK_HEADERS.path = Headers
221 QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
225 QMAKE_LFLAGS_SONAME = "$${QMAKE_LFLAGS_SONAME}$${DESTDIR}$${QMAKE_DIR_SEP}"
228 plugin_backend_xlib: PKGCONFIG += x11
231 PRE_TARGETDEPS += $$PWD/qtwebkit-export.map
232 QMAKE_LFLAGS += -Wl,--version-script=$$PWD/qtwebkit-export.map
235 # -lrt is required for shm_open and shm_unlink.