top level:
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Nov 2006 18:39:14 +0000 (18:39 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 19 Nov 2006 18:39:14 +0000 (18:39 +0000)
        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649

        * CMakeLists.txt: Fix Qt-only build without KDE cmake files

JavaScriptCore:

        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649
        Fix CMake Qt-only build without KDE CMake files

        * CMakeLists.txt:
        * pcre/CMakeLists.txt:

WebCore:

        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649
        Fix CMake files for Qt-only build without KDE cmake files.
        Fix Qt/KDE build for the SVG support.
        Fix Qt-only build in the resource handler.

        * CMakeLists.txt:
        * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Added.
        (WebCore::SVGResourceFilter::SVGResourceFilter):
        (WebCore::SVGResourceFilter::~SVGResourceFilter):
        (WebCore::SVGResourceFilter::prepareFilter):
        (WebCore::SVGResourceFilter::applyFilter):
        * platform/network/qt/ResourceHandleManager.cpp:
        (WebCore::ResourceHandleManager::cancel):
        (WebCore::ResourceHandleManager::slotData):
        (WebCore::ResourceHandleManager::slotMimetype):
        (WebCore::ResourceHandleManager::slotResult):
        (WebCore::ResourceHandleManager::deliverJobData):
        * platform/network/qt/ResourceHandleManager.h:
        * platform/network/qt/ResourceHandleQt.cpp:
        * platform/qt/CursorQt.cpp:
        (WebCore::noDropCursor):
        (WebCore::progressCursor):
        (WebCore::aliasCursor):

WebKitQt:

        Reviewed by Zack.

        http://bugs.webkit.org/show_bug.cgi?id=11649
        Fix Qt-only build

        * QtLauncher/CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17853 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
CMakeLists.txt
ChangeLog
JavaScriptCore/CMakeLists.txt
JavaScriptCore/ChangeLog
JavaScriptCore/pcre/CMakeLists.txt
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/platform/network/qt/ResourceHandleManager.cpp
WebCore/platform/network/qt/ResourceHandleManager.h
WebCore/platform/network/qt/ResourceHandleQt.cpp
WebCore/platform/qt/CursorQt.cpp
WebKitQt/ChangeLog
WebKitQt/QtLauncher/CMakeLists.txt

index c728eac..fe8011a 100644 (file)
@@ -39,9 +39,30 @@ IF (WEBKIT_USE_XBL_SUPPORT)
 ENDIF (WEBKIT_USE_XBL_SUPPORT)
 
 # search packages used by KDE
-find_package (KDE4 REQUIRED)
-include (KDE4Defaults)
-include (MacroLibrary)
+IF (WEBKIT_USE_KDE_SUPPORT)
+    find_package (KDE4 REQUIRED)
+    include (KDE4Defaults)
+    include (MacroLibrary)
+
+    # use the KDE modules for finding these
+    find_package (LibXml2 REQUIRED)
+    find_package (LibXslt REQUIRED)
+
+ELSE (WEBKIT_USE_KDE_SUPPORT)
+    INCLUDE(UsePkgConfig)
+
+    PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2CFlags)
+    SET(LIBXML2_LIBRARIES ${_LibXml2LinkFlags})
+    # I'd like to use the output of --cflags directly but cmake craps out on it ;(
+    SET(LIBXML2_INCLUDE_DIR ${_LibXml2IncDir}/libxml2)
+
+    PKGCONFIG(libxslt _LibXslt2IncDir _LibXslt2LinkDir _LibXslt2LinkFlags _LibXslt2CFlags)
+    SET(LIBXSLT_LIBRARIES ${_LibXslt2LinkFlags})
+    SET(LIBXSLT_INCLUDE_DIR ${_LibXslt2IncDir})
+
+    include(CheckLibraryExists)
+    include(FindQt4)
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 # Special option for BuildBot, to disable output colorization (must be done after KDE4Defaults is loaded)
 OPTION (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT "Do not colorize compilation output." OFF)
@@ -50,8 +71,6 @@ IF (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT)
     set(CMAKE_COLOR_MAKEFILE OFF)
 ENDIF (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT)
 
-find_package (LibXml2 REQUIRED)
-find_package (LibXslt REQUIRED)
 find_package (JPEG REQUIRED)
 find_package (PNG REQUIRED)
 
@@ -82,7 +101,9 @@ add_definitions (-DUSE_SYSTEM_MALLOC=1)
 
 add_subdirectory (JavaScriptCore)
 add_subdirectory (WebCore)
-add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj)
+IF (WEBKIT_USE_KDE_SUPPORT)
+    add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj)
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 add_subdirectory (WebKitQt/QtLauncher)
 
index 34227f8..b5d01fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-11-19  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Zack.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11649
+
+        * CMakeLists.txt: Fix Qt-only build without KDE cmake files
+
 2006-10-30  Timothy Hatcher  <timothy@apple.com>
 
         Reviewed by Brady.
index 8058dcb..38cb33a 100644 (file)
@@ -10,6 +10,7 @@ check_library_exists(pthread pthread_attr_get_np "" HAVE_PTHREAD_ATTR_GET_NP)
 check_library_exists(pthread pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP)
 
 include_directories(
+    ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/pcre
     ${CMAKE_CURRENT_SOURCE_DIR}/bindings
     ${CMAKE_CURRENT_SOURCE_DIR}/bindings/c
@@ -55,12 +56,21 @@ add_custom_command(
 
 ########### next target ###############
 
-kde4_add_library(wtf-unity SHARED
-    wtf/TCSystemAlloc.cpp
-    wtf/Assertions.cpp
-    wtf/HashTable.cpp
-    wtf/FastMalloc.cpp
-)
+IF (WEBKIT_USE_KDE_SUPPORT)
+    kde4_add_library(wtf-unity SHARED
+        wtf/TCSystemAlloc.cpp
+        wtf/Assertions.cpp
+        wtf/HashTable.cpp
+        wtf/FastMalloc.cpp
+    )
+ELSE (WEBKIT_USE_KDE_SUPPORT)
+    add_library(wtf-unity SHARED
+        wtf/TCSystemAlloc.cpp
+        wtf/Assertions.cpp
+        wtf/HashTable.cpp
+        wtf/FastMalloc.cpp
+    )
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 set(kjs-unity_LIB_SRCS
     ${kjs-unity_LIB_SRCS}
@@ -118,23 +128,29 @@ set(kjs-unity_LIB_SRCS
     kjs/ExecState.cpp
 )
 
-kde4_add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS})
 
 IF (WEBKIT_USE_KDE_SUPPORT)
 if(UNIX)
+   kde4_add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS})
    target_link_libraries(kjs-unity  ${KDE4_KDECORE_LIBS} m )
 else(UNIX)
    target_link_libraries(kjs-unity  ${KDE4_KDECORE_LIBS})
 endif(UNIX)
+ELSE (WEBKIT_USE_KDE_SUPPORT)
+   add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS})
 ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 target_link_libraries(kjs-unity wtf-unity)
 set_target_properties(kjs-unity PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
 
-install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR})
-install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR})
+IF (WEBKIT_USE_KDE_SUPPORT)
+    install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR})
+    install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR})
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 # testkjs
-set(testkjs_SRCS kjs/testkjs.cpp)
-kde4_add_executable(testkjs RUN_UNINSTALLED ${testkjs_SRCS})
-target_link_libraries(testkjs ${KDE4_KDECORE_LIBS} kjs-unity pcre-unity icuuc)
+IF (WEBKIT_USE_KDE_SUPPORT)
+    set(testkjs_SRCS kjs/testkjs.cpp)
+    kde4_add_executable(testkjs RUN_UNINSTALLED ${testkjs_SRCS})
+    target_link_libraries(testkjs ${KDE4_KDECORE_LIBS} kjs-unity pcre-unity icuuc)
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
index 69a0bf7..04d63b1 100644 (file)
@@ -1,3 +1,13 @@
+2006-11-19  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Zack.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11649
+        Fix CMake Qt-only build without KDE CMake files
+
+        * CMakeLists.txt:
+        * pcre/CMakeLists.txt:
+
 2006-11-17  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Adam.
index d346123..5956a2b 100644 (file)
@@ -1,7 +1,11 @@
 
 project( pcre-unity )
 
-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../wtf )
+include_directories( 
+    ${CMAKE_CURRENT_BINARY_DIR}
+    ${CMAKE_CURRENT_SOURCE_DIR}/..
+    ${CMAKE_CURRENT_SOURCE_DIR}/../wtf
+    )
 #compile dftables.c -> dftables
 #run dftables to generate chartables.c
 
@@ -36,6 +40,10 @@ set(pcre-unity_LIB_SRCS
    pcre_fullinfo.c
    )
 
-kde4_add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS})
+IF (WEBKIT_USE_KDE_SUPPORT)
+    kde4_add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS})
+ELSE (WEBKIT_USE_KDE_SUPPORT)
+    add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS})
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 
index c231b96..a50621f 100644 (file)
@@ -1,7 +1,9 @@
 
 project( WebCore )
 
-include (CheckCXXCompilerFlag)
+IF (WEBKIT_USE_KDE_SUPPORT)
+    include (CheckCXXCompilerFlag)
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 include_directories(
    BEFORE ${CMAKE_CURRENT_BINARY_DIR}
@@ -51,20 +53,28 @@ include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/rendering
    ${CMAKE_CURRENT_BINARY_DIR}/xml
    ${CMAKE_CURRENT_SOURCE_DIR}/xml
+   ${LIBXML2_INCLUDE_DIR}
+   ${QT_INCLUDES}
 )
 
-include_directories( ${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES} )
-
 add_definitions( -DQT3_SUPPORT -Wno-undef -Wno-unused-parameter )
-check_cxx_compiler_flag( -Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS )
+IF (WEBKIT_USE_KDE_SUPPORT)
+    check_cxx_compiler_flag( -Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS )
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 IF ( __KDE_HAVE_WVARIADIC_MACROS )
   add_definitions( -Wno-variadic-macros )
 ENDIF (__KDE_HAVE_WVARIADIC_MACROS)
 
-kde4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp )
-kde4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp )
-kde4_automoc( WebCore platform/qt/SharedTimerQt.cpp )
+IF (WEBKIT_USE_KDE_SUPPORT)
+    kde4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp )
+    kde4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp )
+    kde4_automoc( WebCore platform/qt/SharedTimerQt.cpp )
+ELSE (WEBKIT_USE_KDE_SUPPORT)
+    qt4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp )
+    qt4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp )
+    qt4_automoc( WebCore platform/qt/SharedTimerQt.cpp )
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 SET (FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT)
 
@@ -1069,6 +1079,7 @@ set(WebCore_SRCS
     platform/graphics/svg/qt/SVGResourceClipperQt.cpp
     platform/graphics/svg/qt/SVGResourceImageQt.cpp
     platform/graphics/svg/qt/SVGResourceMaskerQt.cpp
+    platform/graphics/svg/qt/SVGResourceFilterQt.cpp
 
     platform/image-decoders/bmp/BMPImageDecoder.cpp
     platform/image-decoders/gif/GIFImageDecoder.cpp
@@ -1256,7 +1267,11 @@ set(WebCore_SRCS
     ${WebCore-unity-IDLGeneratedSources}
 )
 
-kde4_add_library( WebCore-unity SHARED  ${WebCore_SRCS} )
+IF (WEBKIT_USE_KDE_SUPPORT)
+    kde4_add_library( WebCore-unity SHARED  ${WebCore_SRCS} )
+ELSE (WEBKIT_USE_KDE_SUPPORT)
+    add_library( WebCore-unity SHARED  ${WebCore_SRCS} )
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
 IF (WEBKIT_USE_KDE_SUPPORT)
 target_link_libraries(WebCore-unity
@@ -1291,4 +1306,6 @@ target_link_libraries(WebCore-unity
 )
 ENDIF (WEBKIT_USE_KDE_SUPPORT)
 
-install( TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR} )
+IF (WEBKIT_USE_KDE_SUPPORT)
+    install( TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR} )
+ENDIF (WEBKIT_USE_KDE_SUPPORT)
index 7b414d3..174a171 100644 (file)
@@ -1,3 +1,31 @@
+2006-11-19  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Zack.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11649
+        Fix CMake files for Qt-only build without KDE cmake files.
+        Fix Qt/KDE build for the SVG support.
+        Fix Qt-only build in the resource handler.
+
+        * CMakeLists.txt:
+        * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Added.
+        (WebCore::SVGResourceFilter::SVGResourceFilter):
+        (WebCore::SVGResourceFilter::~SVGResourceFilter):
+        (WebCore::SVGResourceFilter::prepareFilter):
+        (WebCore::SVGResourceFilter::applyFilter):
+        * platform/network/qt/ResourceHandleManager.cpp:
+        (WebCore::ResourceHandleManager::cancel):
+        (WebCore::ResourceHandleManager::slotData):
+        (WebCore::ResourceHandleManager::slotMimetype):
+        (WebCore::ResourceHandleManager::slotResult):
+        (WebCore::ResourceHandleManager::deliverJobData):
+        * platform/network/qt/ResourceHandleManager.h:
+        * platform/network/qt/ResourceHandleQt.cpp:
+        * platform/qt/CursorQt.cpp:
+        (WebCore::noDropCursor):
+        (WebCore::progressCursor):
+        (WebCore::aliasCursor):
+
 2006-11-19  Mitz Pettel  <mitz@webkit.org>
 
         Reviewed by Maciej.
index a0e5805..257ee1d 100644 (file)
@@ -284,7 +284,23 @@ void ResourceHandleManager::add(ResourceHandle* resource, FrameQtClient* frameCl
 void ResourceHandleManager::cancel(ResourceHandle* job)
 {
     remove(job);
-    job->setError(1);
+    //FIXME set an error state
+    //job->setError(1);
+}
+
+void ResourceHandleManager::slotData(KIO::Job*, const QByteArray& data)
+{
+    // dummy, never called in a Qt-only build
+}
+
+void ResourceHandleManager::slotMimetype(KIO::Job*, const QString& type)
+{
+    // dummy, never called in a Qt-only build
+}
+
+void ResourceHandleManager::slotResult(KJob*)
+{
+    // dummy, never called in a Qt-only build
 }
 
 void ResourceHandleManager::deliverJobData(QtJob* job, const QByteArray& data)
@@ -299,7 +315,8 @@ void ResourceHandleManager::deliverJobData(QtJob* job, const QByteArray& data)
 
     d->m_client->didReceiveData(handle, data.data(), data.size());
 
-    handle->setError(0);
+    //FIXME: should report an error
+    //handle->setError(0);
     remove(handle);
 
     ASSERT(m_frameClient);
index 8780701..afb0b92 100644 (file)
 
 #include "ResourceHandle.h"
 
+// forward declarations for Qt-only build
+namespace KIO {
+class Job;
+}
+class KJob;
+
 namespace WebCore {
 
 class FrameQtClient;
index 7d04087..aaec306 100644 (file)
 
 #include "config.h"
 
+#if PLATFORM(KDE)
 #include <kio/job.h>
+#endif
+
+#include <QRegExp>
 
 #include "FrameQt.h"
 #include "DocLoader.h"
index 59454cb..2833453 100644 (file)
@@ -241,6 +241,21 @@ const Cursor& contextMenuCursor()
     return Cursors::self()->PointerCursor;
 }
 
+const Cursor& noDropCursor()
+{
+    return Cursors::self()->PointerCursor;
+}
+
+const Cursor& progressCursor()
+{
+    return Cursors::self()->PointerCursor;
+}
+
+const Cursor& aliasCursor()
+{
+    return Cursors::self()->PointerCursor;
+}
+
 }
 
 // vim: ts=4 sw=4 et
index 907b327..fdc8634 100644 (file)
@@ -1,3 +1,12 @@
+2006-11-19  Simon Hausmann  <hausmann@kde.org>
+
+        Reviewed by Zack.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11649
+        Fix Qt-only build
+
+        * QtLauncher/CMakeLists.txt:
+
 2006-11-17  Zack Rusin  <zack@kde.org>
 
         Reviewed by Mitz. Landed by Niko.
index 8100624..58990e2 100644 (file)
@@ -23,10 +23,13 @@ include_directories(
 add_definitions(-Wno-undef -Wno-unused-parameter)
 
 set(testunity_SRCS main.cpp)
-kde4_automoc(testunity ${testunity_SRCS})
-kde4_add_executable(testunity RUN_UNINSTALLED ${testunity_SRCS})
 IF (WEBKIT_USE_KDE_SUPPORT)
-target_link_libraries(testunity  ${KDE4_KDECORE_LIBS} WebCore-unity )
+    kde4_add_executable(testunity RUN_UNINSTALLED ${testunity_SRCS})
+    target_link_libraries(testunity  ${KDE4_KDECORE_LIBS} WebCore-unity)
+    kde4_automoc(testunity ${testunity_SRCS})
 ELSE (WEBKIT_USE_KDE_SUPPORT)
-target_link_libraries(testunity WebCore-unity )
+    include_directories(${QT_INCLUDES})
+    add_executable(testunity ${testunity_SRCS})
+    target_link_libraries(testunity WebCore-unity)
+    qt4_automoc(testunity ${testunity_SRCS})
 ENDIF (WEBKIT_USE_KDE_SUPPORT)