Reviewed by eseidel.
authorrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2006 14:19:27 +0000 (14:19 +0000)
committerrwlbuis <rwlbuis@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2006 14:19:27 +0000 (14:19 +0000)
        Qt/Linux build system changes: enable xpath/xslt by default.
        Offer possibility to change all of these using 'ccmake'.

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

CMakeLists.txt
WebCore/CMakeLists.txt
WebCore/ChangeLog

index 6297873..e23fc2f 100644 (file)
@@ -17,6 +17,27 @@ IF (WEBKIT_USE_SVG_SUPPORT)
     add_definitions (-DSVG_SUPPORT=1)
 ENDIF (WEBKIT_USE_SVG_SUPPORT)
 
+# Global switch for XPath support
+OPTION (WEBKIT_USE_XPATH_SUPPORT "Compile WebKit with XPath support." ON)
+
+IF (WEBKIT_USE_XPATH_SUPPORT)
+    add_definitions (-DXPATH_SUPPORT=1)
+ENDIF (WEBKIT_USE_XPATH_SUPPORT)
+
+# Global switch for XSLT support
+OPTION (WEBKIT_USE_XSLT_SUPPORT "Compile WebKit with XSLT support." ON)
+
+IF (WEBKIT_USE_XSLT_SUPPORT)
+    add_definitions (-DXSLT_SUPPORT=1)
+ENDIF (WEBKIT_USE_XSLT_SUPPORT)
+
+# Global switch for XBL support
+OPTION (WEBKIT_USE_XBL_SUPPORT "Compile WebKit with XBL support." OFF)
+
+IF (WEBKIT_USE_XBL_SUPPORT)
+    add_definitions (-DXBL_SUPPORT=1)
+ENDIF (WEBKIT_USE_XBL_SUPPORT)
+
 # search packages used by KDE
 find_package (KDE4 REQUIRED)
 include (KDE4Defaults)
index 4697910..7dc6305 100644 (file)
@@ -64,11 +64,31 @@ kde4_automoc(platform/qt/SharedTimerQt.cpp)
 kde4_automoc(platform/qt/ScrollViewCanvasQt.cpp)
 kde4_automoc(platform/qt/ResourceLoaderManager.cpp)
 
-SET(FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT XPATH_SUPPORT)
+SET(FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT)
+
+IF (WEBKIT_USE_XPATH_SUPPORT)
+SET(FEATURE_DEFINES_JAVASCRIPT ${FEATURE_DEFINES_JAVASCRIPT} XPATH_SUPPORT)
+
+set(IDL_BINDINGS_XPATH
+  xml/XPathExpression.idl
+  xml/XPathNSResolver.idl
+  xml/XPathEvaluator.idl
+  xml/XPathResult.idl
+)
+
+ENDIF (WEBKIT_USE_XPATH_SUPPORT)
+
+IF (WEBKIT_USE_XSLT_SUPPORT)
+SET(FEATURE_DEFINES_JAVASCRIPT ${FEATURE_DEFINES_JAVASCRIPT} XSLT_SUPPORT)
+ENDIF (WEBKIT_USE_XSLT_SUPPORT)
+
+IF (WEBKIT_USE_XBL_SUPPORT)
+SET(FEATURE_DEFINES_JAVASCRIPT ${FEATURE_DEFINES_JAVASCRIPT} XBL_SUPPORT)
+ENDIF (WEBKIT_USE_XBL_SUPPORT)
 
 # rules for generated files
 IF (WEBKIT_USE_SVG_SUPPORT)
-SET(FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT SVG_SUPPORT)
+SET(FEATURE_DEFINES_JAVASCRIPT ${FEATURE_DEFINES_JAVASCRIPT} SVG_SUPPORT)
 
 set(IDL_BINDINGS_SVG
 
@@ -276,17 +296,13 @@ set(IDL_BINDINGS
   html/HTMLUListElement.idl
   html/HTMLOptionsCollection.idl
 
-  xml/XPathNSResolver.idl
-  xml/XPathExpression.idl
-  xml/XPathResult.idl
-  xml/XPathEvaluator.idl
   xml/DOMParser.idl
   xml/XMLSerializer.idl
 
   page/DOMWindow.idl
 
   ${IDL_BINDINGS_SVG}
+  ${IDL_BINDINGS_XPATH}
 )
 
 set(WebCore-unity-IDLGeneratedSources )
@@ -403,6 +419,16 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/CSSGrammar.cpp ${CMAKE_CUR
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/css/CSSGrammar.y
 )
 
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/XPathGrammar.cpp ${CMAKE_CURRENT_BINARY_DIR}/XPathGrammar.h
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+  COMMAND ${BISON_EXECUTABLE} -d -p xpathyy ${CMAKE_CURRENT_SOURCE_DIR}/xml/XPathGrammar.y
+  COMMAND mv XPathGrammar.tab.c ${CMAKE_CURRENT_BINARY_DIR}/XPathGrammar.cpp
+  #COMMAND rm -f XPathGrammar.tab.h
+  #COMMAND touch XPathGrammar.h
+  COMMAND mv XPathGrammar.tab.h ${CMAKE_CURRENT_BINARY_DIR}/XPathGrammar.h
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/xml/XPathGrammar.y
+)
+
 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/HTMLNames.cpp ${CMAKE_CURRENT_BINARY_DIR}/html/HTMLNames.h
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
   COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/html
@@ -479,8 +505,15 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/UserAgentStyleSheets.h ${C
 )
 
 # source stuff
+if (WEBKIT_USE_XPATH_SUPPORT)
+SET (XPATH_SOURCES
+    ${CMAKE_CURRENT_BINARY_DIR}/XPathGrammar.h
+    ${CMAKE_CURRENT_BINARY_DIR}/XPathGrammar.cpp
+)
+ENDIF (WEBKIT_USE_XPATH_SUPPORT)
+
 IF (WEBKIT_USE_SVG_SUPPORT)
-set (SVG_STUFF
+set (SVG_SOURCES
     ${CMAKE_CURRENT_BINARY_DIR}/ksvg2/svg/SVGNames.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/ksvg2/svg/SVGElementFactory.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/ksvg2/misc/XLinkNames.cpp
@@ -771,7 +804,9 @@ set(WebCore_SRCS
 #   kwq/KWQWMatrix.cpp
 #   kwq/KWQCString.cpp
 
-    ${SVG_STUFF}
+    ${SVG_SOURCES}
+    ${XPATH_SOURCES}
+
     editing/InsertIntoTextNodeCommand.cpp
     editing/WrapContentsInDummySpanCommand.cpp
     editing/ReplaceSelectionCommand.cpp
index 8d18794..2a4658b 100644 (file)
@@ -1,3 +1,12 @@
+2006-09-24  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed by eseidel.
+
+        Qt/Linux build system changes: enable xpath/xslt by default.
+        Offer possibility to change all of these using 'ccmake'.
+
+        * CMakeLists.txt:
+
 2006-09-24  Dave Hyatt  <hyatt@apple.com>
 
         Cleanup of Scrollbar APIs.  Rename setKnobProportion to setProportion.  Rename setScrollbarValue to updateThumbPosition.