Title: [121228] trunk
Revision
121228
Author
hausm...@webkit.org
Date
2012-06-25 21:47:14 -0700 (Mon, 25 Jun 2012)

Log Message

[Qt] Make it possible to build WebKit without QtWidgets
https://bugs.webkit.org/show_bug.cgi?id=78109

Reviewed by Tor Arne Vestbø.

.:

* Source/QtWebKit.pro: Don't build WK1 tests and examples if WK1 is disabled.
* Source/api.pri: Move WK1 sources away from here and use WEBKIT += webkit1 instead
* WebKit.pro: Add WK1 to SUBDIRS unless no_webkit1 is set.

Source/WebKit:

Moved WebKit1 sources into a separate static library. Only WK1
depends on QtWidgets.

* WebKit1.pri: Added.
* WebKit1.pro: Added.

Source/WebKit2:

* WebKit2.pri: Add missing WK2 specific dependencies.
* qt/MainQt.cpp: Do the QStyle initialization hook only if we are
compiling with QtWidgets support.
(WebKit):
(main):

Tools:

* Tools.pro: Disable various tools that depend on WK1.
* qmake/mkspecs/features/default_post.prf: Add WK1 as supported static lib in WEBKIT
* qmake/mkspecs/features/default_pre.prf: Disable WK1 if QtWidgets is not built.
* qmake/mkspecs/modules/webkit1.prf: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (121227 => 121228)


--- trunk/ChangeLog	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/ChangeLog	2012-06-26 04:47:14 UTC (rev 121228)
@@ -1,3 +1,14 @@
+2012-06-25  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        [Qt] Make it possible to build WebKit without QtWidgets
+        https://bugs.webkit.org/show_bug.cgi?id=78109
+
+        Reviewed by Tor Arne Vestbø.
+
+        * Source/QtWebKit.pro: Don't build WK1 tests and examples if WK1 is disabled.
+        * Source/api.pri: Move WK1 sources away from here and use WEBKIT += webkit1 instead
+        * WebKit.pro: Add WK1 to SUBDIRS unless no_webkit1 is set.
+
 2012-06-25  Gyuyoung Kim  <gyuyoung....@samsung.com>
 
         [EFL] Implement Network Information API

Modified: trunk/Source/QtWebKit.pro (121227 => 121228)


--- trunk/Source/QtWebKit.pro	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Source/QtWebKit.pro	2012-06-26 04:47:14 UTC (rev 121228)
@@ -27,11 +27,12 @@
 declarative.makefile = Makefile.declarative
 SUBDIRS += declarative
 
-tests.file = tests.pri
-SUBDIRS += tests
+!no_webkit1 {
+    tests.file = tests.pri
+    SUBDIRS += tests
 
-examples.file = WebKit/qt/examples/examples.pro
-examples.CONFIG += no_default_target
-examples.makefile = Makefile
-SUBDIRS += examples
-
+    examples.file = WebKit/qt/examples/examples.pro
+    examples.CONFIG += no_default_target
+    examples.makefile = Makefile
+    SUBDIRS += examples
+}

Modified: trunk/Source/WebKit/ChangeLog (121227 => 121228)


--- trunk/Source/WebKit/ChangeLog	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Source/WebKit/ChangeLog	2012-06-26 04:47:14 UTC (rev 121228)
@@ -1,3 +1,16 @@
+2012-06-25  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        [Qt] Make it possible to build WebKit without QtWidgets
+        https://bugs.webkit.org/show_bug.cgi?id=78109
+
+        Reviewed by Tor Arne Vestbø.
+
+        Moved WebKit1 sources into a separate static library. Only WK1
+        depends on QtWidgets.
+
+        * WebKit1.pri: Added.
+        * WebKit1.pro: Added.
+
 2012-06-25  Gyuyoung Kim  <gyuyoung....@samsung.com>
 
         [EFL] Implement Network Information API

Added: trunk/Source/WebKit/WebKit1.pri (0 => 121228)


--- trunk/Source/WebKit/WebKit1.pri	                        (rev 0)
+++ trunk/Source/WebKit/WebKit1.pri	2012-06-26 04:47:14 UTC (rev 121228)
@@ -0,0 +1,54 @@
+# -------------------------------------------------------------------
+# This file contains shared rules used both when building WebKit1
+# itself, and by targets that use WebKit1.
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+SOURCE_DIR = $${ROOT_WEBKIT_DIR}/Source/WebKit
+
+INCLUDEPATH += \
+    $$SOURCE_DIR/qt/Api \
+    $$SOURCE_DIR/qt/WebCoreSupport \
+    $$ROOT_WEBKIT_DIR/Source/WTF/wtf/qt
+
+contains(DEFINES, ENABLE_VIDEO=1):contains(DEFINES, WTF_USE_QTKIT=1) {
+    LIBS += -framework Security -framework IOKit
+
+    # We can know the Mac OS version by using the Darwin major version
+    DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
+    DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
+    equals(DARWIN_MAJOR_VERSION, "11") {
+        LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
+    } else:equals(DARWIN_MAJOR_VERSION, "10") {
+        LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
+    } else:equals(DARWIN_MAJOR_VERSION, "9") {
+        LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
+    }
+}
+
+contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) || contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
+    haveQt(5) {
+        QT += sensors
+    } else {
+        CONFIG *= mobility
+        MOBILITY *= sensors
+    }
+}
+
+contains(DEFINES, ENABLE_GEOLOCATION=1):haveQt(5): QT += location
+
+contains(CONFIG, texmap): DEFINES += WTF_USE_TEXTURE_MAPPER=1
+
+plugin_backend_xlib: PKGCONFIG += x11
+
+QT += network
+haveQt(5): QT += widgets printsupport quick
+
+contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1)|contains(DEFINES, ENABLE_WEBGL=1) {
+    QT *= opengl
+    # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
+    win32*:!win32-msvc*: LIBS += $$QMAKE_LIBS_OPENGL
+}
+
+

Added: trunk/Source/WebKit/WebKit1.pro (0 => 121228)


--- trunk/Source/WebKit/WebKit1.pro	                        (rev 0)
+++ trunk/Source/WebKit/WebKit1.pro	2012-06-26 04:47:14 UTC (rev 121228)
@@ -0,0 +1,152 @@
+# -------------------------------------------------------------------
+# Target file for the WebKit1 static library
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+TEMPLATE = lib
+TARGET = WebKit1
+
+load(features)
+
+include(WebKit1.pri)
+
+WEBKIT += wtf _javascript_core webcore
+QT += gui widgets
+
+CONFIG += staticlib
+
+SOURCES += \
+    $$PWD/qt/Api/qwebframe.cpp \
+    $$PWD/qt/Api/qgraphicswebview.cpp \
+    $$PWD/qt/Api/qwebpage.cpp \
+    $$PWD/qt/Api/qwebview.cpp \
+    $$PWD/qt/Api/qwebelement.cpp \
+    $$PWD/qt/Api/qwebhistory.cpp \
+    $$PWD/qt/Api/qwebsettings.cpp \
+    $$PWD/qt/Api/qwebhistoryinterface.cpp \
+    $$PWD/qt/Api/qwebplugindatabase.cpp \
+    $$PWD/qt/Api/qwebpluginfactory.cpp \
+    $$PWD/qt/Api/qwebsecurityorigin.cpp \
+    $$PWD/qt/Api/qwebscriptworld.cpp \
+    $$PWD/qt/Api/qwebdatabase.cpp \
+    $$PWD/qt/Api/qwebinspector.cpp \
+    $$PWD/qt/Api/qwebkitversion.cpp \
+    $$PWD/qt/Api/qhttpheader.cpp \
+    $$PWD/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
+    $$PWD/qt/WebCoreSupport/QtWebComboBox.cpp \
+    $$PWD/qt/WebCoreSupport/ChromeClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/ContextMenuClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/DragClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
+    $$PWD/qt/WebCoreSupport/EditorClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/UndoStepQt.cpp \
+    $$PWD/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
+    $$PWD/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/InitWebCoreQt.cpp \
+    $$PWD/qt/WebCoreSupport/InspectorClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/InspectorServerQt.cpp \
+    $$PWD/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/PageClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/PopupMenuQt.cpp \
+    $$PWD/qt/WebCoreSupport/QtPlatformPlugin.cpp \
+    $$PWD/qt/WebCoreSupport/RenderThemeQStyle.cpp \
+    $$PWD/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp \
+    $$PWD/qt/WebCoreSupport/SearchPopupMenuQt.cpp \
+    $$PWD/qt/WebCoreSupport/TextCheckerClientQt.cpp \
+    $$PWD/qt/WebCoreSupport/PlatformStrategiesQt.cpp \
+    $$PWD/qt/WebCoreSupport/WebEventConversion.cpp
+
+HEADERS += \
+    $$PWD/qt/Api/qwebframe.h \
+    $$PWD/qt/Api/qwebframe_p.h \
+    $$PWD/qt/Api/qgraphicswebview.h \
+    $$PWD/qt/Api/qwebkitglobal.h \
+    $$PWD/qt/Api/qwebkitplatformplugin.h \
+    $$PWD/qt/Api/qwebpage.h \
+    $$PWD/qt/Api/qwebview.h \
+    $$PWD/qt/Api/qwebsettings.h \
+    $$PWD/qt/Api/qwebhistoryinterface.h \
+    $$PWD/qt/Api/qwebdatabase.h \
+    $$PWD/qt/Api/qwebsecurityorigin.h \
+    $$PWD/qt/Api/qwebelement.h \
+    $$PWD/qt/Api/qwebelement_p.h \
+    $$PWD/qt/Api/qwebpluginfactory.h \
+    $$PWD/qt/Api/qwebhistory.h \
+    $$PWD/qt/Api/qwebinspector.h \
+    $$PWD/qt/Api/qwebkitversion.h \
+    $$PWD/qt/Api/qwebplugindatabase_p.h \
+    $$PWD/qt/Api/qhttpheader_p.h \
+    $$PWD/qt/WebCoreSupport/InitWebCoreQt.h \
+    $$PWD/qt/WebCoreSupport/InspectorServerQt.h \
+    $$PWD/qt/WebCoreSupport/QtFallbackWebPopup.h \
+    $$PWD/qt/WebCoreSupport/QtWebComboBox.h \
+    $$PWD/qt/WebCoreSupport/FrameLoaderClientQt.h \
+    $$PWD/qt/WebCoreSupport/FrameNetworkingContextQt.h \
+    $$PWD/qt/WebCoreSupport/GeolocationPermissionClientQt.h \
+    $$PWD/qt/WebCoreSupport/NotificationPresenterClientQt.h \
+    $$PWD/qt/WebCoreSupport/PageClientQt.h \
+    $$PWD/qt/WebCoreSupport/PopupMenuQt.h \
+    $$PWD/qt/WebCoreSupport/QtPlatformPlugin.h \
+    $$PWD/qt/WebCoreSupport/RenderThemeQStyle.h \
+    $$PWD/qt/WebCoreSupport/ScrollbarThemeQStyle.h \
+    $$PWD/qt/WebCoreSupport/SearchPopupMenuQt.h \
+    $$PWD/qt/WebCoreSupport/TextCheckerClientQt.h \
+    $$PWD/qt/WebCoreSupport/PlatformStrategiesQt.h \
+    $$PWD/qt/WebCoreSupport/WebEventConversion.h
+
+INCLUDEPATH += \
+    $$PWD/qt/Api \
+    $$PWD/qt/WebCoreSupport
+
+contains(DEFINES, ENABLE_VIDEO=1) {
+    !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
+        HEADERS += $$PWD/qt/WebCoreSupport/FullScreenVideoWidget.h
+        SOURCES += $$PWD/qt/WebCoreSupport/FullScreenVideoWidget.cpp
+    }
+
+    contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
+        HEADERS += $$PWD/qt/WebCoreSupport/FullScreenVideoQt.h
+        SOURCES += $$PWD/qt/WebCoreSupport/FullScreenVideoQt.cpp
+    }
+
+    contains(DEFINES, WTF_USE_QTKIT=1) {
+        INCLUDEPATH += \
+            $$PWD/../WebCore/platform/qt/ \
+            $$PWD/../WebCore/platform/mac/ \
+            $$PWD/../../WebKitLibraries/
+
+        DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
+
+        contains(CONFIG, "x86") {
+            DEFINES+=NS_BUILD_32_LIKE_64
+        }
+
+        HEADERS += \
+            $$PWD/qt/WebCoreSupport/WebSystemInterface.h \
+            $$PWD/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h
+
+        OBJECTIVE_SOURCES += \
+            $$PWD/qt/WebCoreSupport/WebSystemInterface.mm \
+            $$PWD/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm
+    }
+}
+
+contains(DEFINES, ENABLE_ICONDATABASE=1) {
+    HEADERS += \
+        $$PWD/../WebCore/loader/icon/IconDatabaseClient.h \
+        $$PWD/qt/WebCoreSupport/IconDatabaseClientQt.h
+
+    SOURCES += \
+        $$PWD/qt/WebCoreSupport/IconDatabaseClientQt.cpp
+}
+
+contains(DEFINES, ENABLE_GEOLOCATION=1) {
+     HEADERS += \
+        $$PWD/qt/WebCoreSupport/GeolocationClientQt.h
+     SOURCES += \
+        $$PWD/qt/WebCoreSupport/GeolocationClientQt.cpp
+}
+
+

Modified: trunk/Source/WebKit2/ChangeLog (121227 => 121228)


--- trunk/Source/WebKit2/ChangeLog	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Source/WebKit2/ChangeLog	2012-06-26 04:47:14 UTC (rev 121228)
@@ -1,3 +1,16 @@
+2012-06-25  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        [Qt] Make it possible to build WebKit without QtWidgets
+        https://bugs.webkit.org/show_bug.cgi?id=78109
+
+        Reviewed by Tor Arne Vestbø.
+
+        * WebKit2.pri: Add missing WK2 specific dependencies.
+        * qt/MainQt.cpp: Do the QStyle initialization hook only if we are
+        compiling with QtWidgets support.
+        (WebKit):
+        (main):
+
 2012-06-25  Raphael Kubo da Costa  <rak...@webkit.org>
 
         [EFL][WK2] Include unistd.h in PlatformProcessIdentifier.h.

Modified: trunk/Source/WebKit2/WebKit2.pri (121227 => 121228)


--- trunk/Source/WebKit2/WebKit2.pri	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Source/WebKit2/WebKit2.pri	2012-06-26 04:47:14 UTC (rev 121228)
@@ -71,3 +71,7 @@
     # -lrt is required for shm_open and shm_unlink.
     LIBS += -lrt
 }
+
+QT += qml quick
+
+contains(DEFINES, ENABLE_GEOLOCATION=1):haveQt(5): QT += location

Modified: trunk/Source/WebKit2/qt/MainQt.cpp (121227 => 121228)


--- trunk/Source/WebKit2/qt/MainQt.cpp	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Source/WebKit2/qt/MainQt.cpp	2012-06-26 04:47:14 UTC (rev 121228)
@@ -34,7 +34,9 @@
 
 namespace WebKit {
 Q_DECL_IMPORT int WebProcessMainQt(QGuiApplication*);
+#if !defined(QT_NO_WIDGETS)
 Q_DECL_IMPORT void initializeWebKit2Theme();
+#endif
 }
 
 #if !defined(NDEBUG) && defined(Q_OS_UNIX)
@@ -72,7 +74,9 @@
     }
 #endif
 
+#if !defined(QT_NO_WIDGETS)
     WebKit::initializeWebKit2Theme();
+#endif
 
     // Has to be done before QApplication is constructed in case
     // QApplication itself produces debug output.

Modified: trunk/Source/api.pri (121227 => 121228)


--- trunk/Source/api.pri	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Source/api.pri	2012-06-26 04:47:14 UTC (rev 121228)
@@ -126,8 +126,6 @@
 
 load(features)
 
-include(WebKit/WebKit.pri)
-
 WEBKIT += wtf
 
 !v8:WEBKIT += _javascript_core
@@ -138,151 +136,16 @@
     WEBKIT += webkit2
     QT += declarative
 
-    # Ensure that changes to the WebKit2 API will trigger a qmake of this
+    # Ensure that changes to the WebKit1 and WebKit2 API will trigger a qmake of this
     # file, which in turn runs syncqt to update the forwarding headers.
     QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
+    QMAKE_INTERNAL_INCLUDED_FILES *= WebKit/WebKit1.pro
 }
 
-QT += network
-haveQt(5): QT += widgets printsupport quick
+!no_webkit1: WEBKIT += webkit1
 
-contains(DEFINES, WTF_USE_TEXTURE_MAPPER_GL=1)|contains(DEFINES, ENABLE_WEBGL=1) {
-    QT *= opengl
-    # Make sure OpenGL libs are after the webcore lib so MinGW can resolve symbols
-    win32*:!win32-msvc*: LIBS += $$QMAKE_LIBS_OPENGL
-}
-
 !static: DEFINES += QT_MAKEDLL
 
-SOURCES += \
-    $$PWD/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/QtWebComboBox.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/ContextMenuClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/DragClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/EditorClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/UndoStepQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/PageClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/RenderThemeQStyle.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/TextCheckerClientQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp \
-    $$PWD/WebKit/qt/WebCoreSupport/WebEventConversion.cpp
-
-HEADERS += \
-    $$PWD/WebKit/qt/WebCoreSupport/InitWebCoreQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/InspectorServerQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/QtFallbackWebPopup.h \
-    $$PWD/WebKit/qt/WebCoreSupport/QtWebComboBox.h \
-    $$PWD/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/GeolocationPermissionClientQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/PageClientQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/PopupMenuQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h \
-    $$PWD/WebKit/qt/WebCoreSupport/RenderThemeQStyle.h \
-    $$PWD/WebKit/qt/WebCoreSupport/ScrollbarThemeQStyle.h \
-    $$PWD/WebKit/qt/WebCoreSupport/SearchPopupMenuQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h \
-    $$PWD/WebKit/qt/WebCoreSupport/WebEventConversion.h
-
-INCLUDEPATH += \
-    $$PWD/WebKit/qt/Api \
-    $$PWD/WebKit/qt/WebCoreSupport \
-    $$PWD/WTF/wtf/qt
-
-contains(DEFINES, ENABLE_VIDEO=1) {
-    !contains(DEFINES, WTF_USE_QTKIT=1):!contains(DEFINES, WTF_USE_GSTREAMER=1):contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
-        HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.h
-        SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoWidget.cpp
-    }
-
-    contains(DEFINES, WTF_USE_QTKIT=1) | contains(DEFINES, WTF_USE_GSTREAMER=1) | contains(DEFINES, WTF_USE_QT_MULTIMEDIA=1) {
-        HEADERS += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.h
-        SOURCES += $$PWD/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
-    }
-
-    contains(DEFINES, WTF_USE_QTKIT=1) {
-        INCLUDEPATH += \
-            $$PWD/WebCore/platform/qt/ \
-            $$PWD/WebCore/platform/mac/ \
-            $$PWD/../WebKitLibraries/
-
-        DEFINES += NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
-
-        contains(CONFIG, "x86") {
-            DEFINES+=NS_BUILD_32_LIKE_64
-        }
-
-        HEADERS += \
-            $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.h \
-            $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.h
-
-        OBJECTIVE_SOURCES += \
-            $$PWD/WebKit/qt/WebCoreSupport/WebSystemInterface.mm \
-            $$PWD/WebKit/qt/WebCoreSupport/QTKitFullScreenVideoHandler.mm
-
-        LIBS += -framework Security -framework IOKit
-
-        # We can know the Mac OS version by using the Darwin major version
-        DARWIN_VERSION = $$split(QMAKE_HOST.version, ".")
-        DARWIN_MAJOR_VERSION = $$first(DARWIN_VERSION)
-        equals(DARWIN_MAJOR_VERSION, "11") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLion.a
-        } else:equals(DARWIN_MAJOR_VERSION, "10") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
-        } else:equals(DARWIN_MAJOR_VERSION, "9") {
-            LIBS += $${ROOT_WEBKIT_DIR}/WebKitLibraries/libWebKitSystemInterfaceLeopard.a
-        }
-    }
-}
-
-contains(DEFINES, ENABLE_ICONDATABASE=1) {
-    HEADERS += \
-        $$PWD/WebCore/loader/icon/IconDatabaseClient.h \
-        $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.h
-
-    SOURCES += \
-        $$PWD/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.cpp
-}
-
-contains(DEFINES, ENABLE_DEVICE_ORIENTATION=1) || contains(DEFINES, ENABLE_ORIENTATION_EVENTS=1) {
-    haveQt(5) {
-        QT += sensors
-    } else {
-        CONFIG *= mobility
-        MOBILITY *= sensors
-    }
-}
-
-contains(DEFINES, ENABLE_GEOLOCATION=1) {
-     haveQt(5): QT += location
-
-     HEADERS += \
-        $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.h
-     SOURCES += \
-        $$PWD/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
-}
-
-contains(CONFIG, texmap) {
-    DEFINES += WTF_USE_TEXTURE_MAPPER=1
-}
-
-plugin_backend_xlib: PKGCONFIG += x11
-
 # ------------- Install rules -------------
 
 haveQt(5) {

Modified: trunk/Tools/ChangeLog (121227 => 121228)


--- trunk/Tools/ChangeLog	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Tools/ChangeLog	2012-06-26 04:47:14 UTC (rev 121228)
@@ -1,3 +1,15 @@
+2012-06-25  Simon Hausmann  <simon.hausm...@nokia.com>
+
+        [Qt] Make it possible to build WebKit without QtWidgets
+        https://bugs.webkit.org/show_bug.cgi?id=78109
+
+        Reviewed by Tor Arne Vestbø.
+
+        * Tools.pro: Disable various tools that depend on WK1.
+        * qmake/mkspecs/features/default_post.prf: Add WK1 as supported static lib in WEBKIT
+        * qmake/mkspecs/features/default_pre.prf: Disable WK1 if QtWidgets is not built.
+        * qmake/mkspecs/modules/webkit1.prf: Added.
+
 2012-06-25  Dirk Pranke  <dpra...@chromium.org>
 
         put vista back for chromium (non-webkit) bots ...

Modified: trunk/Tools/Tools.pro (121227 => 121228)


--- trunk/Tools/Tools.pro	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Tools/Tools.pro	2012-06-26 04:47:14 UTC (rev 121228)
@@ -9,13 +9,16 @@
 
 load(features)
 
-SUBDIRS += QtTestBrowser/QtTestBrowser.pro
-SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
-SUBDIRS += DumpRenderTree/qt/ImageDiff.pro
+!no_webkit1 {
+    SUBDIRS += QtTestBrowser/QtTestBrowser.pro
+    SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
+    SUBDIRS += DumpRenderTree/qt/ImageDiff.pro
+}
 
 !no_webkit2 {
-    SUBDIRS += MiniBrowser/qt/MiniBrowser.pro \
-               WebKitTestRunner/WebKitTestRunner.pro
+    SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
+    # WTR's InjectedBundle depends currently on WK1's DumpRenderTreeSupport
+    !no_webkit1: SUBDIRS += WebKitTestRunner/WebKitTestRunner.pro
 }
 
 # FIXME: with Qt 5 the test plugin cause some trouble during layout tests.

Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (121227 => 121228)


--- trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf	2012-06-26 04:47:14 UTC (rev 121228)
@@ -164,7 +164,7 @@
 
 # Reorder libraries so that the link and include order is correct,
 # and make sure the case matches the original case.
-libraries = WebKit2 WebCore _javascript_Core WTF
+libraries = WebKit1 WebKit2 WebCore _javascript_Core WTF
 for(library, libraries) {
     contains(WEBKIT, $$lower($$library)) {
         WEBKIT -= $$lower($$library)

Modified: trunk/Tools/qmake/mkspecs/features/default_pre.prf (121227 => 121228)


--- trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/Tools/qmake/mkspecs/features/default_pre.prf	2012-06-26 04:47:14 UTC (rev 121228)
@@ -105,7 +105,8 @@
 
 haveQt(5): {
     isEmpty(QT.widgets.name)|isEmpty(QT.printsupport.name) {
-        root_project_file: error("Building WebKit against Qt 5.0 requires the QtWidgets and QtPrintSupport modules.")
+        root_project_file: message("WebKit1 requires the QtWidgets and QtPrintSupport modules. Disabling WebKit1.")
+        CONFIG += no_webkit1
     }
 }
 

Added: trunk/Tools/qmake/mkspecs/modules/webkit1.prf (0 => 121228)


--- trunk/Tools/qmake/mkspecs/modules/webkit1.prf	                        (rev 0)
+++ trunk/Tools/qmake/mkspecs/modules/webkit1.prf	2012-06-26 04:47:14 UTC (rev 121228)
@@ -0,0 +1,9 @@
+# -------------------------------------------------------------------
+# Module file for WebKit1, used by targets that depend on WebKit1
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+WEBKIT.webkit1.root_source_dir = $${ROOT_WEBKIT_DIR}/Source/WebKit
+
+include($${WEBKIT.webkit1.root_source_dir}/WebKit1.pri)

Modified: trunk/WebKit.pro (121227 => 121228)


--- trunk/WebKit.pro	2012-06-26 04:43:44 UTC (rev 121227)
+++ trunk/WebKit.pro	2012-06-26 04:47:14 UTC (rev 121228)
@@ -30,12 +30,18 @@
 WebCore.makefile = Makefile.WebCore
 SUBDIRS += WebCore
 
-!CONFIG(no_webkit2) {
+!no_webkit2 {
     webkit2.file = Source/WebKit2/WebKit2.pro
     webkit2.makefile = Makefile.WebKit2
     SUBDIRS += webkit2
 }
 
+!no_webkit1 {
+    webkit1.file = Source/WebKit/WebKit1.pro
+    webkit1.makefile = Makefile.WebKit1
+    SUBDIRS += webkit1
+}
+
 QtWebKit.file = Source/QtWebKit.pro
 QtWebKit.makefile = Makefile.QtWebKit
 SUBDIRS += QtWebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to