From 43c2650f8d42bdb071b355aa2470f514287b1b89 Mon Sep 17 00:00:00 2001 From: thatcher Date: Wed, 30 Aug 2006 18:29:55 +0000 Subject: [PATCH] JavaScriptCore: Reviewed by Tim H. Commit KDE related tweaks, to be able to differentiate between a Qt-only or a KDE build. * CMakeLists.txt: Install wtf-unity library. * wtf/Platform.h: Add define for the KDE platform. WebCore: Reviewed by Tim H. Commit KDE related tweaks, to be able to differentiate between a Qt-only or a KDE build. * CMakeLists.txt: Move global variables up to trunk/CMakeLists.txt. Also rename USE_WEBKIT_SVG_SUPPORT to WEBKIT_USE_SVG_SUPPORT. WebKitTools: Reviewed by Tim H. Commit KDE related tweaks, to be able to differentiate between a Qt-only or a KDE build. * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt: Add ksvg2/ includes. * QtLauncher/CMakeLists.txt: Add ksvg2/ includes. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16115 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- CMakeLists.txt | 50 ++++++++++++------- JavaScriptCore/CMakeLists.txt | 4 +- JavaScriptCore/ChangeLog | 10 ++++ JavaScriptCore/wtf/Platform.h | 9 +++- WebCore/CMakeLists.txt | 26 ++++------ WebCore/ChangeLog | 10 ++++ WebKitTools/ChangeLog | 10 ++++ .../DumpRenderTree.qtproj/CMakeLists.txt | 4 +- WebKitTools/QtLauncher/CMakeLists.txt | 4 +- 9 files changed, 87 insertions(+), 40 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f6f068c83c6..544c80453ca5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,18 +1,34 @@ +project (WebKit) -project( WebKit ) +# Qt support is always enabled! +add_definitions (-DBUILDING_QT__=1) + +# Global switch for KDE support +OPTION (WEBKIT_USE_KDE_SUPPORT "Compile WebKit with KDE support." ON) + +IF (WEBKIT_USE_KDE_SUPPORT) + add_definitions (-DBUILDING_KDE__=1) +ENDIF (WEBKIT_USE_KDE_SUPPORT) + +# Global switch for SVG support +OPTION (WEBKIT_USE_SVG_SUPPORT "Compile WebKit with SVG support." ON) + +IF (WEBKIT_USE_SVG_SUPPORT) + add_definitions (-DSVG_SUPPORT=1) +ENDIF (WEBKIT_USE_SVG_SUPPORT) # search packages used by KDE -find_package(KDE4 REQUIRED) +find_package (KDE4 REQUIRED) include (KDE4Defaults) include (MacroLibrary) -find_package(LibXml2 REQUIRED) -find_package(LibXslt REQUIRED) -find_package(JPEG REQUIRED) -find_package(PNG REQUIRED) +find_package (LibXml2 REQUIRED) +find_package (LibXslt REQUIRED) +find_package (JPEG REQUIRED) +find_package (PNG REQUIRED) -find_program(BISON_EXECUTABLE bison) -find_program(GPERF_EXECUTABLE gperf) +find_program (BISON_EXECUTABLE bison) +find_program (GPERF_EXECUTABLE gperf) # quick check the libicu is available find_path(LIBICU_INCLUDE_DIR unicode/umachine.h ) @@ -33,16 +49,12 @@ add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT -DHAVE_CONF link_directories (${KDE4_LIB_DIR}) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${LIBICU_INCLUDE_DIR}) -add_definitions( -fpermissive ) -add_definitions( -DUSE_SYSTEM_MALLOC=1 ) - -# Once we use KDE stuff, adjust wtf/Platform.h for BUILDING_KDE__ ... -add_definitions( -DBUILDING_QT__=1 ) - -add_subdirectory( JavaScriptCore ) -add_subdirectory( WebCore ) -add_subdirectory( WebKitTools/QtLauncher ) -add_subdirectory( WebKitTools/DumpRenderTree/DumpRenderTree.qtproj ) +add_definitions (-fpermissive) +add_definitions (-DUSE_SYSTEM_MALLOC=1) -include_directories ( BEFORE ${CMAKE_CURRENT_BINARY_DIR} ) +add_subdirectory (JavaScriptCore) +add_subdirectory (WebCore) +add_subdirectory (WebKitTools/QtLauncher) +add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj) +include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/JavaScriptCore/CMakeLists.txt b/JavaScriptCore/CMakeLists.txt index d0573ad32533..939801be5f49 100644 --- a/JavaScriptCore/CMakeLists.txt +++ b/JavaScriptCore/CMakeLists.txt @@ -127,4 +127,6 @@ endif(UNIX) target_link_libraries(kjs-unity wtf-unity) set_target_properties(kjs-unity PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) -install(TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR} ) + +install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR}) +install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR}) diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index b4f08e568681..35f98b825e61 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,13 @@ +2006-08-30 Nikolas Zimmermann + + Reviewed by Tim H. + + Commit KDE related tweaks, to be able to + differentiate between a Qt-only or a KDE build. + + * CMakeLists.txt: Install wtf-unity library. + * wtf/Platform.h: Add define for the KDE platform. + 2006-08-28 Darin Adler Reviewed by Geoff. diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h index 87bf941b7956..7ea043b3c17b 100644 --- a/JavaScriptCore/wtf/Platform.h +++ b/JavaScriptCore/wtf/Platform.h @@ -69,6 +69,12 @@ /* PLATFORM(WIN) */ #if defined(BUILDING_QT__) #define KXMLCORE_PLATFORM_QT 1 + +/* PLATFORM(KDE) */ +#if defined(BUILDING_KDE__) +#define KXMLCORE_PLATFORM_KDE 1 +#endif + #elif PLATFORM(DARWIN) #define KXMLCORE_PLATFORM_MAC 1 #elif PLATFORM(WIN_OS) @@ -160,7 +166,8 @@ /* for Unicode, KDE uses Qt, everything else uses ICU */ #if PLATFORM(KDE) -#define KXMLCORE_USE_QT4_UNICODE 1 +// FIXME: Not using Qt4 unicode for now! +#define KXMLCORE_USE_ICU_UNICODE 1 #else #define KXMLCORE_USE_ICU_UNICODE 1 #endif diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt index 52c6dcb7c21b..f423e644c3f1 100644 --- a/WebCore/CMakeLists.txt +++ b/WebCore/CMakeLists.txt @@ -1,9 +1,6 @@ project( WebCore ) -# Global switch for SVG support -SET (USE_WEBKIT_SVG_SUPPORT 1) - include (CheckCXXCompilerFlag) include_directories( @@ -56,11 +53,6 @@ include_directories( ${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES} ) add_definitions ( -DQT3_SUPPORT -Wno-undef -Wno-unused-parameter ) - -IF (USE_WEBKIT_SVG_SUPPORT) -add_definitions ( -DSVG_SUPPORT=1 ) -ENDIF (USE_WEBKIT_SVG_SUPPORT) - check_cxx_compiler_flag(-Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS) IF(__KDE_HAVE_WVARIADIC_MACROS) @@ -72,7 +64,7 @@ kde4_automoc(platform/qt/ScrollViewCanvasQt.cpp) kde4_automoc(platform/qt/ResourceLoaderManager.cpp) # rules for generated files -IF (USE_WEBKIT_SVG_SUPPORT) +IF (WEBKIT_USE_SVG_SUPPORT) set(IDL_BINDINGS_SVG # ksvg2/svg/SVGNumber.idl # ksvg2/svg/SVGPoint.idl @@ -112,7 +104,7 @@ set(IDL_BINDINGS_SVG ksvg2/svg/SVGPathSegMovetoAbs.idl ksvg2/svg/SVGPathSegMovetoRel.idl ) -ENDIF (USE_WEBKIT_SVG_SUPPORT) +ENDIF (WEBKIT_USE_SVG_SUPPORT) set(IDL_BINDINGS css/CSSValue.idl @@ -215,7 +207,7 @@ set(WebCore-unity-IDLGeneratedSources ) foreach (idl ${IDL_BINDINGS}) get_filename_component(_basename ${idl} NAME_WE) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/JS${_basename}.cpp ${CMAKE_CURRENT_BINARY_DIR}/JS${_basename}.h - COMMAND perl -I${CMAKE_CURRENT_SOURCE_DIR}/bindings/scripts ${CMAKE_CURRENT_SOURCE_DIR}/bindings/scripts/generate-bindings.pl --defines \"SVG_SUPPORT=${USE_WEBKIT_SVG_SUPPORT}\" --generator JS --include dom --include html --include xml --include ksvg2/svg --outputdir ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${idl} + COMMAND perl -I${CMAKE_CURRENT_SOURCE_DIR}/bindings/scripts ${CMAKE_CURRENT_SOURCE_DIR}/bindings/scripts/generate-bindings.pl --defines \"SVG_SUPPORT=${WEBKIT_USE_SVG_SUPPORT}\" --generator JS --include dom --include html --include xml --include ksvg2/svg --outputdir ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${idl} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${idl} ) set(WebCore-unity-IDLGeneratedSources ${WebCore-unity-IDLGeneratedSources} ${CMAKE_CURRENT_BINARY_DIR}/JS${_basename}.cpp ${CMAKE_CURRENT_BINARY_DIR}/JS${_basename}.h ) endforeach (idl) @@ -247,10 +239,10 @@ create_lut(WebCore-unity_LIB_SRCS bindings/js/JSXMLHttpRequest.cpp JSXMLHttpRequ create_lut(WebCore-unity_LIB_SRCS bindings/js/JSXSLTProcessor.cpp JSXSLTProcessor.lut.h bindings/js/JSXSLTProcessor.cpp) create_cpp_lut(bindings/js/JSHTMLInputElementBase.cpp JSHTMLInputElementBaseTable.cpp bindings/js/JSHTMLInputElementBase.cpp) -IF (USE_WEBKIT_SVG_SUPPORT) +IF (WEBKIT_USE_SVG_SUPPORT) create_cpp_lut(ksvg2/bindings/js/JSSVGPoint.cpp JSSVGPointTable.cpp ksvg2/bindings/js/JSSVGPoint.cpp) create_cpp_lut(ksvg2/bindings/js/JSSVGRect.cpp JSSVGRectTable.cpp ksvg2/bindings/js/JSSVGRect.cpp) -ENDIF (USE_WEBKIT_SVG_SUPPORT) +ENDIF (WEBKIT_USE_SVG_SUPPORT) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tokenizer.cpp COMMAND flex -t < ${CMAKE_CURRENT_SOURCE_DIR}/css/tokenizer.flex | perl ${CMAKE_CURRENT_SOURCE_DIR}/css/maketokenizer > ${CMAKE_CURRENT_BINARY_DIR}/tokenizer.cpp @@ -367,7 +359,7 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/CharacterData.cpp ) # source stuff -IF (USE_WEBKIT_SVG_SUPPORT) +IF (WEBKIT_USE_SVG_SUPPORT) set (SVG_STUFF ${CMAKE_CURRENT_BINARY_DIR}/ksvg2/svg/SVGNames.cpp ${CMAKE_CURRENT_BINARY_DIR}/ksvg2/svg/SVGElementFactory.cpp @@ -545,8 +537,7 @@ set (SVG_STUFF kcanvas/RenderSVGImage.cpp kcanvas/RenderForeignObject.cpp ) -ENDIF(USE_WEBKIT_SVG_SUPPORT) - +ENDIF(WEBKIT_USE_SVG_SUPPORT) set(WebCore_SRCS @@ -1036,7 +1027,6 @@ set(WebCore_SRCS kde4_add_library(WebCore-unity SHARED ${WebCore_SRCS}) target_link_libraries(WebCore-unity - ${QT_QT3SUPPORT_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTSVG_LIBRARY} @@ -1049,3 +1039,5 @@ target_link_libraries(WebCore-unity kjs-unity pcre-unity ) + +install (TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR}) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 0affe6a0f5dd..c11bec902ff5 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,13 @@ +2006-08-30 Nikolas Zimmermann + + Reviewed by Tim H. + + Commit KDE related tweaks, to be able to + differentiate between a Qt-only or a KDE build. + + * CMakeLists.txt: Move global variables up to trunk/CMakeLists.txt. + Also rename USE_WEBKIT_SVG_SUPPORT to WEBKIT_USE_SVG_SUPPORT. + 2006-08-30 Timothy Hatcher Rubber-stamped by Brady. diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog index 1d3038eb644a..1ae53444cc15 100644 --- a/WebKitTools/ChangeLog +++ b/WebKitTools/ChangeLog @@ -1,3 +1,13 @@ +2006-08-30 Nikolas Zimmermann + + Reviewed by Tim H. + + Commit KDE related tweaks, to be able to + differentiate between a Qt-only or a KDE build. + + * DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt: Add ksvg2/ includes. + * QtLauncher/CMakeLists.txt: Add ksvg2/ includes. + 2006-08-29 Darin Adler Reviewed by Tim Hatcher. diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt b/WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt index c289b74088de..b2340ffdafb8 100644 --- a/WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt +++ b/WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/CMakeLists.txt @@ -6,7 +6,9 @@ include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/loader BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/platform BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/platform/qt - BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/kwq + BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/ksvg2 + BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/ksvg2/svg + BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/ksvg2/css BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/rendering BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/editing BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../../WebCore/html diff --git a/WebKitTools/QtLauncher/CMakeLists.txt b/WebKitTools/QtLauncher/CMakeLists.txt index 54e0f3c7baa3..db3b6d0ed5e7 100644 --- a/WebKitTools/QtLauncher/CMakeLists.txt +++ b/WebKitTools/QtLauncher/CMakeLists.txt @@ -6,7 +6,9 @@ include_directories( BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/loader BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/platform BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/platform/qt - BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/kwq + BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/ksvg2 + BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/ksvg2/svg + BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/ksvg2/css BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/rendering BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/editing BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/../../WebCore/html -- 2.36.0