Gdk build fixes using the Qt build's qmake tool from Holger Freyther, reviewed by...
[WebKit-https.git] / WebCore / WebCore.pro
index 43e00e4..dd27e2e 100644 (file)
@@ -1,11 +1,14 @@
-# WebCore - Qt4 build info
+# WebCore - qmake build info
+include($$PWD/../WebKit.pri)
+qt-port:LIBS -= -lWebKitQt
+gdk-port:LIBS -= -lWebKitGdk
 
 TEMPLATE = lib
-TARGET = WebKitQt
+qt-port:TARGET = WebKitQt
+gdk-port:TARGET = WebKitGdk
 OBJECTS_DIR = tmp
-INCLUDEPATH += tmp
+INCLUDEPATH += tmp $$OUTPUT_DIR/WebCore/tmp
 
-isEmpty(OUTPUT_DIR):OUTPUT_DIR=$$PWD/..
 DESTDIR = $$OUTPUT_DIR/lib
 
 include($$OUTPUT_DIR/config.pri)
@@ -14,18 +17,12 @@ CONFIG -= warn_on
 QMAKE_CXXFLAGS += -Wreturn-type
 #QMAKE_CXXFLAGS += -Wall -Wno-undef -Wno-unused-parameter
 
-contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
+qt-port:contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
 unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
 
 linux-*: DEFINES += HAVE_STDINT_H
 freebsd-*: DEFINES += HAVE_PTHREAD_NP_H
 
-DEFINES += USE_SYSTEM_MALLOC
-
-CONFIG(release) {
-    DEFINES += NDEBUG
-}
-
 # PRE-BUILD: make the required config.h file
 #config_h.target = config.h
 #config_h.commands = cp config.h.qmake config.h
@@ -39,9 +36,11 @@ DEFINES += BUILD_WEBKIT
 DEFINES += ENABLE_XPATH=1
 DEFINES += ENABLE_XSLT=1
 #DEFINES += ENABLE_XBL=1
-DEFINES += ENABLE_SVG=1
+qt-port:DEFINES += ENABLE_SVG=1
 
-DEFINES += WTF_CHANGES=1 BUILDING_QT__=1
+DEFINES += WTF_CHANGES=1
+gdk-port:PKGCONFIG += libcurl
+gdk-port:LIBS += $$system(icu-config --ldflags)
 
 include($$PWD/../JavaScriptCore/JavaScriptCore.pri)
 
@@ -53,26 +52,38 @@ macx {
     INCLUDEPATH += /usr/include/libxml2
     LIBS += -L/opt/local/lib -lxml2 -lxslt
 }
+qt-port:INCLUDEPATH += \
+                $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/ \
+                $$PWD/platform/qt \
+                $$PWD/platform/network/qt \
+                $$PWD/platform/graphics/qt \
+                $$PWD/platform/graphics/svg/qt \
+                $$PWD/loader/qt \
+                $$PWD/page/qt \
+                $$PWD/../WebKitQt/WebCoreSupport \
+                $$PWD/../WebKitQt/Api
+
+gdk-port:INCLUDEPATH += \
+    $$PWD/platform/image-decoders/bmp \
+    $$PWD/platform/image-decoders/gif \
+    $$PWD/platform/image-decoders/ico \
+    $$PWD/platform/image-decoders/jpeg \
+    $$PWD/platform/image-decoders/png \
+    $$PWD/platform/image-decoders/xbm
 
 INCLUDEPATH +=  $$PWD \
-                $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/ \
                 $$PWD/ForwardingHeaders \
                 $$PWD/../JavaScriptCore/kjs \
                 $$PWD/../JavaScriptCore/bindings \
                 $$PWD/platform \
-                $$PWD/platform/qt \
                 $$PWD/platform/network \
-                $$PWD/platform/network/qt \
                 $$PWD/platform/graphics \
-                $$PWD/platform/graphics/qt \
                 $$PWD/platform/graphics/svg \
-                $$PWD/platform/graphics/svg/qt \
                 $$PWD/platform/graphics/svg/filters \
-                $$PWD/loader $$PWD/loader/icon $$PWD/loader/qt \
+                $$PWD/loader $$PWD/loader/icon \
                 $$PWD/css \
                 $$PWD/dom \
                 $$PWD/page \
-                $$PWD/page/qt \
                 $$PWD/bridge \
                 $$PWD/editing \
                 $$PWD/rendering \
@@ -82,15 +93,13 @@ INCLUDEPATH +=  $$PWD \
                 $$PWD/bindings/js \
                 $$PWD/ksvg2 $$PWD/ksvg2/css $$PWD/ksvg2/svg $$PWD/ksvg2/misc $$PWD/ksvg2/events \
                 $$PWD/platform/image-decoders \
-                $$PWD/../WebKitQt/WebCoreSupport \
-                $$PWD/../WebKitQt/Api
+                $$PWD/../WebKitQt/WebCoreSupport
 QT += network
 LIBS += -lsqlite3
 
 
 FEATURE_DEFINES_JAVASCRIPT = LANGUAGE_JAVASCRIPT
 
-
 TOKENIZER = $$PWD/css/tokenizer.flex
 
 CSSBISON = $$PWD/css/CSSGrammar.y
@@ -113,7 +122,8 @@ SVGCSSVALUES = $$PWD/ksvg2/css/CSSValueKeywords.in
 
 STYLESHEETS_EMBED = $$PWD/css/html4.css
 
-MANUALMOC += \
+MANUALMOC =
+qt-port:MANUALMOC += \
     $$PWD/platform/network/qt/ResourceHandleManagerQt.h \
     $$PWD/platform/qt/QWebPopup.h \
     $$PWD/platform/qt/SharedTimerQt.h \
@@ -372,7 +382,6 @@ SOURCES += \
     editing/MergeIdenticalElementsCommand.cpp \
     editing/ModifySelectionListLevel.cpp \
     editing/MoveSelectionCommand.cpp \
-    editing/qt/EditorQt.cpp \
     editing/RemoveCSSPropertyCommand.cpp \
     editing/RemoveNodeAttributeCommand.cpp \
     editing/RemoveNodeCommand.cpp \
@@ -394,7 +403,6 @@ SOURCES += \
     history/CachedPage.cpp \
     history/HistoryItem.cpp \
     history/HistoryItemTimer.cpp \
-    history/qt/CachedPageQt.cpp \
     html/CanvasGradient.cpp \
     html/CanvasPattern.cpp \
     html/CanvasRenderingContext2D.cpp \
@@ -503,7 +511,6 @@ SOURCES += \
     loader/NetscapePlugInStreamLoader.cpp \
     loader/PluginDocument.cpp \
     loader/ProgressTracker.cpp \
-    loader/qt/DocumentLoaderQt.cpp \
     loader/Request.cpp \
     loader/ResourceLoader.cpp \
     loader/SubresourceLoader.cpp \
@@ -520,9 +527,6 @@ SOURCES += \
     page/FrameView.cpp \
     page/MouseEventWithHitTestResults.cpp \
     page/Page.cpp \
-    page/qt/DragControllerQt.cpp \
-    page/qt/EventHandlerQt.cpp \
-    page/qt/FrameQt.cpp \
     page/Settings.cpp \
     platform/Arena.cpp \
     platform/ArrayImpl.cpp \
@@ -560,20 +564,6 @@ SOURCES += \
     platform/graphics/Path.cpp \
     platform/graphics/PathTraversalState.cpp \
     platform/graphics/Pen.cpp \
-    platform/graphics/qt/AffineTransformQt.cpp \
-    platform/graphics/qt/ColorQt.cpp \
-    platform/graphics/qt/FloatPointQt.cpp \
-    platform/graphics/qt/FloatRectQt.cpp \
-    platform/graphics/qt/GraphicsContextQt.cpp \
-    platform/graphics/qt/IconQt.cpp \
-    platform/graphics/qt/ImageBufferQt.cpp \
-    platform/graphics/qt/ImageDecoderQt.cpp \
-    platform/graphics/qt/ImageQt.cpp \
-    platform/graphics/qt/ImageSourceQt.cpp \
-    platform/graphics/qt/IntPointQt.cpp \
-    platform/graphics/qt/IntRectQt.cpp \
-    platform/graphics/qt/IntSizeQt.cpp \
-    platform/graphics/qt/PathQt.cpp \
     platform/KURL.cpp \
     platform/Logging.cpp \
     platform/MimeTypeRegistry.cpp \
@@ -582,45 +572,9 @@ SOURCES += \
     platform/network/FormData.cpp \
     platform/network/HTTPParsers.cpp \
     platform/network/ProtectionSpace.cpp \
-    platform/network/qt/ResourceHandleManagerQt.cpp \
-    platform/network/qt/ResourceHandleQt.cpp \
     platform/network/ResourceHandle.cpp \
     platform/network/ResourceRequest.cpp \
     platform/network/ResourceResponse.cpp \
-    platform/qt/ClipboardQt.cpp \
-    platform/qt/ContextMenuItemQt.cpp \
-    platform/qt/ContextMenuQt.cpp \
-    platform/qt/CookieJarQt.cpp \
-    platform/qt/CursorQt.cpp \
-    platform/qt/DragDataQt.cpp \
-    platform/qt/DragImageQt.cpp \
-    platform/qt/FileChooserQt.cpp \
-    platform/qt/FontCacheQt.cpp \
-    platform/qt/FontDataQt.cpp \
-    platform/qt/FontPlatformDataQt.cpp \
-    platform/qt/FontQt.cpp \
-    platform/qt/GlyphPageTreeNodeQt.cpp \
-    platform/qt/MimeTypeRegistryQt.cpp \
-    platform/qt/PasteboardQt.cpp \
-    platform/qt/PlatformKeyboardEventQt.cpp \
-    platform/qt/PlatformMouseEventQt.cpp \
-    platform/qt/PlatformScrollBarQt.cpp \
-    platform/qt/PopupMenuQt.cpp \
-    platform/qt/QWebPopup.cpp \
-    platform/qt/RenderThemeQt.cpp \
-    platform/qt/ScreenQt.cpp \
-    platform/qt/ScrollViewQt.cpp \
-    platform/qt/SearchPopupMenuQt.cpp \
-    platform/qt/SharedTimerQt.cpp \
-    platform/qt/SoundQt.cpp \
-    platform/qt/StringQt.cpp \
-    platform/qt/SystemTimeQt.cpp \
-    platform/qt/TemporaryLinkStubs.cpp \
-    platform/qt/TextBoundaries.cpp \
-    platform/qt/TextBreakIteratorQt.cpp \
-    platform/qt/TextCodecQt.cpp \
-    platform/qt/WheelEventQt.cpp \
-    platform/qt/WidgetQt.cpp \
     platform/RegularExpression.cpp \
     platform/ScrollBar.cpp \
 #    platform/SearchPopupMenu.cpp \
@@ -713,7 +667,65 @@ SOURCES += \
     xml/XPathVariableReference.cpp \
     xml/XSLImportRule.cpp \
     xml/XSLStyleSheet.cpp \
-    xml/XSLTProcessor.cpp \
+    xml/XSLTProcessor.cpp
+
+qt-port:SOURCES += \
+    page/qt/DragControllerQt.cpp \
+    page/qt/EventHandlerQt.cpp \
+    page/qt/FrameQt.cpp \
+    loader/qt/DocumentLoaderQt.cpp \
+    platform/graphics/qt/AffineTransformQt.cpp \
+    platform/graphics/qt/ColorQt.cpp \
+    platform/graphics/qt/FloatPointQt.cpp \
+    platform/graphics/qt/FloatRectQt.cpp \
+    platform/graphics/qt/GraphicsContextQt.cpp \
+    platform/graphics/qt/IconQt.cpp \
+    platform/graphics/qt/ImageBufferQt.cpp \
+    platform/graphics/qt/ImageDecoderQt.cpp \
+    platform/graphics/qt/ImageQt.cpp \
+    platform/graphics/qt/ImageSourceQt.cpp \
+    platform/graphics/qt/IntPointQt.cpp \
+    platform/graphics/qt/IntRectQt.cpp \
+    platform/graphics/qt/IntSizeQt.cpp \
+    platform/graphics/qt/PathQt.cpp \
+    platform/network/qt/ResourceHandleManagerQt.cpp \
+    platform/network/qt/ResourceHandleQt.cpp \
+    editing/qt/EditorQt.cpp \
+    history/qt/CachedPageQt.cpp \
+    platform/qt/ClipboardQt.cpp \
+    platform/qt/ContextMenuItemQt.cpp \
+    platform/qt/ContextMenuQt.cpp \
+    platform/qt/CookieJarQt.cpp \
+    platform/qt/CursorQt.cpp \
+    platform/qt/DragDataQt.cpp \
+    platform/qt/DragImageQt.cpp \
+    platform/qt/FileChooserQt.cpp \
+    platform/qt/FontCacheQt.cpp \
+    platform/qt/FontDataQt.cpp \
+    platform/qt/FontPlatformDataQt.cpp \
+    platform/qt/FontQt.cpp \
+    platform/qt/GlyphPageTreeNodeQt.cpp \
+    platform/qt/MimeTypeRegistryQt.cpp \
+    platform/qt/PasteboardQt.cpp \
+    platform/qt/PlatformKeyboardEventQt.cpp \
+    platform/qt/PlatformMouseEventQt.cpp \
+    platform/qt/PlatformScrollBarQt.cpp \
+    platform/qt/PopupMenuQt.cpp \
+    platform/qt/QWebPopup.cpp \
+    platform/qt/RenderThemeQt.cpp \
+    platform/qt/ScreenQt.cpp \
+    platform/qt/ScrollViewQt.cpp \
+    platform/qt/SearchPopupMenuQt.cpp \
+    platform/qt/SharedTimerQt.cpp \
+    platform/qt/SoundQt.cpp \
+    platform/qt/StringQt.cpp \
+    platform/qt/SystemTimeQt.cpp \
+    platform/qt/TemporaryLinkStubs.cpp \
+    platform/qt/TextBoundaries.cpp \
+    platform/qt/TextBreakIteratorQt.cpp \
+    platform/qt/TextCodecQt.cpp \
+    platform/qt/WheelEventQt.cpp \
+    platform/qt/WidgetQt.cpp \
     ../WebKitQt/WebCoreSupport/ChromeClientQt.cpp \
     ../WebKitQt/WebCoreSupport/ContextMenuClientQt.cpp \
     ../WebKitQt/WebCoreSupport/DragClientQt.cpp \
@@ -725,6 +737,100 @@ SOURCES += \
     ../WebKitQt/Api/qwebpage.cpp \
     ../WebKitQt/Api/qwebpagehistory.cpp
 
+gdk-port:SOURCES += \
+        platform/TextCodecICU.cpp \
+        platform/TextBreakIteratorICU.cpp \
+        page/gdk/EventHandlerGdk.cpp \
+        page/gdk/ContextMenuClientGdk.cpp \
+        page/gdk/DragControllerGdk.cpp \
+        loader/gdk/DocumentLoaderGdk.cpp \
+        loader/gdk/FrameLoaderClientGdk.cpp \
+        platform/gdk/CookieJarGdk.cpp \
+        platform/gdk/CursorGdk.cpp \
+        platform/gdk/DragDataGdk.cpp \
+        platform/gdk/DragImageGdk.cpp \
+        platform/gdk/EditorClientGdk.cpp \
+        platform/gdk/FontCacheGdk.cpp \
+        platform/gdk/FontDataGdk.cpp \
+        platform/gdk/FontGdk.cpp \
+        platform/gdk/FontPlatformDataGdk.cpp \
+        platform/gdk/FrameGdk.cpp \
+        platform/gdk/GlyphPageTreeNodeGdk.cpp \
+        platform/gdk/KeyEventGdk.cpp \
+        platform/gdk/MimeTypeRegistryGdk.cpp \
+        platform/gdk/MouseEventGdk.cpp \
+        platform/gdk/PopupMenuGdk.cpp \
+        platform/gdk/RenderThemeGdk.cpp \
+        platform/gdk/ScrollViewGdk.cpp \
+        platform/gdk/ScreenGdk.cpp \
+        platform/gdk/SharedTimerLinux.cpp \
+        platform/gdk/SystemTimeLinux.cpp \
+        platform/gdk/TemporaryLinkStubs.cpp \
+        platform/gdk/WheelEventGdk.cpp \
+        platform/gdk/WidgetGdk.cpp \
+        platform/graphics/gdk/ImageGdk.cpp \
+        platform/network/gdk/ResourceHandleCurl.cpp \
+        platform/network/gdk/ResourceHandleManager.cpp \
+        platform/graphics/cairo/AffineTransformCairo.cpp \
+        platform/graphics/cairo/GraphicsContextCairo.cpp \
+        platform/graphics/cairo/ImageCairo.cpp \
+        platform/graphics/cairo/ImageSourceCairo.cpp \
+        platform/graphics/cairo/PathCairo.cpp \
+        platform/image-decoders/gif/GIFImageDecoder.cpp \
+        platform/image-decoders/gif/GIFImageReader.cpp  \
+        platform/image-decoders/png/PNGImageDecoder.cpp \
+        platform/image-decoders/png/png.c \
+        platform/image-decoders/png/pngerror.c \
+        platform/image-decoders/png/pnggccrd.c \
+        platform/image-decoders/png/pngget.c \
+        platform/image-decoders/png/pngmem.c \
+        platform/image-decoders/png/pngpread.c \
+        platform/image-decoders/png/pngread.c \
+        platform/image-decoders/png/pngrio.c \
+        platform/image-decoders/png/pngrtran.c \
+        platform/image-decoders/png/pngrutil.c \
+        platform/image-decoders/png/pngset.c \
+        platform/image-decoders/png/pngtrans.c \
+        platform/image-decoders/png/pngvcrd.c \
+        platform/image-decoders/png/pngwio.c \
+        platform/image-decoders/png/pngwrite.c \
+        platform/image-decoders/png/pngwtran.c \
+        platform/image-decoders/png/pngwutil.c \
+        platform/image-decoders/jpeg/JPEGImageDecoder.cpp \
+        platform/image-decoders/jpeg/jcomapi.c \
+        platform/image-decoders/jpeg/jdapimin.c \
+        platform/image-decoders/jpeg/jdapistd.c \
+        platform/image-decoders/jpeg/jdatadst.c \
+        platform/image-decoders/jpeg/jdatasrc.c \
+        platform/image-decoders/jpeg/jdcoefct.c \
+        platform/image-decoders/jpeg/jdcolor.c \
+        platform/image-decoders/jpeg/jddctmgr.c \
+        platform/image-decoders/jpeg/jdhuff.c \
+        platform/image-decoders/jpeg/jdinput.c \
+        platform/image-decoders/jpeg/jdmainct.c \
+        platform/image-decoders/jpeg/jdmarker.c \
+        platform/image-decoders/jpeg/jdmaster.c \
+        platform/image-decoders/jpeg/jdmerge.c \
+        platform/image-decoders/jpeg/jdphuff.c \
+        platform/image-decoders/jpeg/jdpostct.c \
+        platform/image-decoders/jpeg/jdsample.c \
+        platform/image-decoders/jpeg/jerror.c \
+        platform/image-decoders/jpeg/jfdctflt.c \
+        platform/image-decoders/jpeg/jfdctfst.c \
+        platform/image-decoders/jpeg/jfdctint.c \
+        platform/image-decoders/jpeg/jidctflt.c \
+        platform/image-decoders/jpeg/jidctfst.c \
+        platform/image-decoders/jpeg/jidctint.c \
+        platform/image-decoders/jpeg/jmemmgr.c \
+        platform/image-decoders/jpeg/jmemnobs.c \
+        platform/image-decoders/jpeg/jquant1.c \
+        platform/image-decoders/jpeg/jquant2.c \
+        platform/image-decoders/jpeg/jutils.c \
+        platform/image-decoders/bmp/BMPImageDecoder.cpp \
+        platform/image-decoders/ico/ICOImageDecoder.cpp \
+        platform/image-decoders/xbm/XBMImageDecoder.cpp
+
 contains(DEFINES, ENABLE_XPATH=1) {
     FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH
 
@@ -1024,16 +1130,6 @@ contains(DEFINES, ENABLE_SVG=1) {
         platform/graphics/svg/filters/SVGFETurbulence.cpp \
         platform/graphics/svg/filters/SVGFilterEffect.cpp \
         platform/graphics/svg/filters/SVGLightSource.cpp \
-        platform/graphics/svg/qt/RenderPathQt.cpp \
-        platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp \
-        platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp \
-        platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp \
-        platform/graphics/svg/qt/SVGPaintServerQt.cpp \
-        platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp \
-        platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp \
-        platform/graphics/svg/qt/SVGResourceClipperQt.cpp \
-        platform/graphics/svg/qt/SVGResourceFilterQt.cpp \
-        platform/graphics/svg/qt/SVGResourceMaskerQt.cpp \
         platform/graphics/svg/SVGImage.cpp \
         platform/graphics/svg/SVGPaintServer.cpp \
         platform/graphics/svg/SVGPaintServerGradient.cpp \
@@ -1061,6 +1157,18 @@ contains(DEFINES, ENABLE_SVG=1) {
         rendering/SVGInlineTextBox.cpp \
         rendering/SVGRootInlineBox.cpp
 
+qt-port:SOURCES += \
+        platform/graphics/svg/qt/RenderPathQt.cpp \
+        platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp \
+        platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp \
+        platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp \
+        platform/graphics/svg/qt/SVGPaintServerQt.cpp \
+        platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp \
+        platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp \
+        platform/graphics/svg/qt/SVGResourceClipperQt.cpp \
+        platform/graphics/svg/qt/SVGResourceFilterQt.cpp \
+        platform/graphics/svg/qt/SVGResourceMaskerQt.cpp
+
         # GENERATOR 5-C:
         svgnames_a.output = tmp/SVGNames.cpp
         svgnames_a.commands = perl $$PWD/ksvg2/scripts/make_names.pl --tags $$PWD/ksvg2/svg/svgtags.in --attrs $$PWD/ksvg2/svg/svgattrs.in --namespace SVG --cppNamespace WebCore --namespaceURI 'http://www.w3.org/2000/svg' --factory --attrsNullNamespace --output tmp