[GTK] [CMake] Clean up generated sources directories
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Dec 2013 19:07:36 +0000 (19:07 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Dec 2013 19:07:36 +0000 (19:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126216

Reviewed by Gustavo Noronha Silva.

.:

* Source/cmake/OptionsGTK.cmake: Pre-define the main derived sources directories
so that they definitions can be shared easily throughout the build system.

Source/WebCore:

* PlatformGTK.cmake: Use the new directory variables.

Source/WebKit:

* PlatformGTK.cmake: Use the new derived source variables.

Source/WebKit2:

* PlatformGTK.cmake: Use the new derived sources variables.
* UIProcess/API/gtk/tests/CMakeLists.txt: Ditto.

Tools:

* DumpRenderTree/PlatformGTK.cmake: Use the new derived sources variables.
* GtkLauncher/CMakeLists.txt: Ditto.
* MiniBrowser/gtk/CMakeLists.txt: Ditto.
* TestWebKitAPI/CMakeLists.txt: Now that the EFL and GTK+ forwarding header locations differ,
move the platform-specific includes to the EFL and GTK platform files. Also clean up forwarding
header generation into on target.
* TestWebKitAPI/PlatformEfl.cmake: Added EFL-specific locations to the include list.
* TestWebKitAPI/PlatformGTK.cmake: Added GTK-specific locations to the include list.
* WebKitTestRunner/CMakeLists.txt: Same as for TestWebKitAPI.
* WebKitTestRunner/PlatformEfl.cmake: Ditto.
* WebKitTestRunner/PlatformGTK.cmake: Ditto.
* gtk/generate-gtkdoc: Update to select the appropriate derived sources locations for
the cmake build.

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

20 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformGTK.cmake
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/UIProcess/API/gtk/tests/CMakeLists.txt
Source/cmake/OptionsGTK.cmake
Tools/ChangeLog
Tools/DumpRenderTree/PlatformGTK.cmake
Tools/GtkLauncher/CMakeLists.txt
Tools/MiniBrowser/gtk/CMakeLists.txt
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/TestWebKitAPI/PlatformGTK.cmake
Tools/WebKitTestRunner/CMakeLists.txt
Tools/WebKitTestRunner/PlatformEfl.cmake
Tools/WebKitTestRunner/PlatformGTK.cmake
Tools/gtk/generate-gtkdoc

index 8506fee..6d84896 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-12-25  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Clean up generated sources directories
+        https://bugs.webkit.org/show_bug.cgi?id=126216
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * Source/cmake/OptionsGTK.cmake: Pre-define the main derived sources directories
+        so that they definitions can be shared easily throughout the build system.
+
 2013-12-23  Jinwoo Song  <jinwoo7.song@samsung.com>
 
         [EFL][CMAKE] Case insensitive string comparison of build type
index 28c47b8..5482ca4 100644 (file)
@@ -1,3 +1,12 @@
+2013-12-25  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Clean up generated sources directories
+        https://bugs.webkit.org/show_bug.cgi?id=126216
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Use the new directory variables.
+
 2013-12-25  Dirk Schulze  <krit@webkit.org>
 
         Support <box> values parsing on 'clip-path' property
index ac5a996..5c09efe 100644 (file)
@@ -437,8 +437,6 @@ target_link_libraries(WebCorePlatformGTK
 )
 
 if (ENABLE_WEBKIT2)
-    set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
-
     include_directories(
         "${WebCore_INCLUDE_DIRECTORIES}"
         "${DERIVED_SOURCES_DIR}"
index 42d4aa3..c48763f 100644 (file)
@@ -1,3 +1,12 @@
+2013-12-25  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Clean up generated sources directories
+        https://bugs.webkit.org/show_bug.cgi?id=126216
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Use the new derived source variables.
+
 2013-12-23  Andy Estes  <aestes@apple.com>
 
         Roll out r161043. It broke 32-bit Mac builds.
index 877d742..a503049 100644 (file)
@@ -1,15 +1,15 @@
-set(DERIVED_SOURCES_WEBKITGTK_DIR ${DERIVED_SOURCES_DIR}/webkit)
 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKITGTK_DIR})
-configure_file(gtk/webkit/webkitversion.h.in ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitversion.h)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKITGTK_API_DIR})
+configure_file(gtk/webkit/webkitversion.h.in ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitversion.h)
 configure_file(gtk/webkit.pc.in ${CMAKE_BINARY_DIR}/Source/WebKit/gtk/webkitgtk-3.0.pc @ONLY)
 
 add_definitions(-DPACKAGE_LOCALE_DIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
 
 list(APPEND WebKit_INCLUDE_DIRECTORIES
     ${DERIVED_SOURCES_DIR}
-    ${DERIVED_SOURCES_DIR}/webkitdom
     ${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}
     ${DERIVED_SOURCES_WEBKITGTK_DIR}
+    ${DERIVED_SOURCES_WEBKITGTK_API_DIR}
     ${THIRDPARTY_DIR}/ANGLE/include/GLSLANG
     ${THIRDPARTY_DIR}/ANGLE/src
     ${THIRDPARTY_DIR}/ANGLE/include
@@ -34,8 +34,8 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES
 )
 
 list(APPEND WebKit_SOURCES
-    ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitenumtypes.cpp
-    ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.cpp
+    ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.cpp
+    ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.cpp
 
     gtk/WebCoreSupport/AcceleratedCompositingContextGL.cpp
     gtk/WebCoreSupport/AssertMatchingEnums.cpp
@@ -137,25 +137,25 @@ list(APPEND WebKit_LIBRARIES
 set(WebKit_MARSHAL_LIST ${WEBKIT_DIR}/gtk/webkitmarshal.list)
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.cpp
-           ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.h
+    OUTPUT ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.cpp
+           ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.h
     MAIN_DEPENDENCY ${WebKit_MARSHAL_LIST}
 
-    COMMAND echo extern \"C\" { > ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.cpp
-    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit_MARSHAL_LIST} --body >> ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.cpp
-    COMMAND echo } >> ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.cpp
+    COMMAND echo extern \"C\" { > ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.cpp
+    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit_MARSHAL_LIST} --body >> ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.cpp
+    COMMAND echo } >> ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.cpp
 
-    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit_MARSHAL_LIST} --header > ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitmarshal.h
+    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit_MARSHAL_LIST} --header > ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitmarshal.h
     VERBATIM
 )
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitenumtypes.h
-           ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitenumtypes.cpp
+    OUTPUT ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.h
+           ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.cpp
     DEPENDS ${WebKitGTK_INSTALLED_HEADERS}
 
-    COMMAND glib-mkenums --template ${WEBKIT_DIR}/gtk/webkit/webkitenumtypes.h.template ${WebKitGTK_INSTALLED_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitenumtypes.h
+    COMMAND glib-mkenums --template ${WEBKIT_DIR}/gtk/webkit/webkitenumtypes.h.template ${WebKitGTK_INSTALLED_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.h
 
-    COMMAND glib-mkenums --template ${WEBKIT_DIR}/gtk/webkit/webkitenumtypes.cpp.template ${WebKitGTK_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkitenumtypes.cpp
+    COMMAND glib-mkenums --template ${WEBKIT_DIR}/gtk/webkit/webkitenumtypes.cpp.template ${WebKitGTK_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.cpp
     VERBATIM
 )
index 8cf6b44..73ef8ec 100644 (file)
@@ -1,3 +1,13 @@
+2013-12-25  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Clean up generated sources directories
+        https://bugs.webkit.org/show_bug.cgi?id=126216
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Use the new derived sources variables.
+        * UIProcess/API/gtk/tests/CMakeLists.txt: Ditto.
+
 2013-12-25  Philippe Normand  <pnormand@igalia.com>
 
         Unreviewed, GTK build fix after r161063
index ccb681d..c5b3fb5 100644 (file)
@@ -1,13 +1,9 @@
-set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
-set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/WebKit2/webkit2gtk)
-set(WEBKIT2_BUILT_API_DIR ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/webkit2)
-set(WEBKIT2_FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk)
-
 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2_DIR})
-file(MAKE_DIRECTORY ${WEBKIT2_BUILT_API_DIR})
-file(MAKE_DIRECTORY ${WEBKIT2_FORWARDING_HEADERS_DIR})
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR})
+file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_DIR})
+file(MAKE_DIRECTORY ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR})
 
-configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${WEBKIT2_BUILT_API_DIR}/WebKitVersion.h)
+configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h)
 configure_file(webkit2gtk.pc.in ${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-3.0.pc @ONLY)
 
 add_definitions(-DWEBKIT2_COMPILATION)
@@ -19,8 +15,8 @@ list(APPEND WebKit2_SOURCES
     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/WebKit2InspectorGResourceBundle.c
     ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.c
 
-    ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
-    ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
+    ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
+    ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
 
     Platform/CoreIPC/unix/AttachmentUnix.cpp
     Platform/CoreIPC/unix/ConnectionUnix.cpp
@@ -376,9 +372,9 @@ list(APPEND WebKit2_MESSAGES_IN_FILES
 
 # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
 list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
-    "${WEBKIT2_FORWARDING_HEADERS_DIR}"
-    "${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension"
-    "${WEBKIT2_BUILT_API_DIR}"
+    "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
+    "${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}"
+    "${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}"
     "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
 )
 
@@ -437,25 +433,25 @@ list(APPEND WebKit2_LIBRARIES
 
 set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
 add_custom_command(
-    OUTPUT ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
-           ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.h
+    OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
+           ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
     MAIN_DEPENDENCY ${WebKit2_MARSHAL_LIST}
 
-    COMMAND echo extern \"C\" { > ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
-    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --body >> ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
-    COMMAND echo } >> ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
+    COMMAND echo extern \"C\" { > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
+    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --body >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
+    COMMAND echo } >> ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.cpp
 
-    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.h
+    COMMAND glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitMarshal.h
     VERBATIM)
 
 add_custom_command(
-    OUTPUT ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.h
-           ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
+    OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
+           ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
     DEPENDS ${WebKit2_INSTALLED_HEADERS}
 
-    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.h
+    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ | sed s/WEBKIT_TYPE_KIT/WEBKIT_TYPE/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
 
-    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
+    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
     VERBATIM)
 
 add_custom_command(
@@ -482,30 +478,17 @@ add_custom_command(
     VERBATIM
 )
 
-# This symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
-add_custom_target(fake-installed-headers
-    mkdir -p ${DERIVED_SOURCES_WEBKIT2_DIR}/webkit2gtk/include
-    COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/gtk ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2
-)
-
-add_custom_target(fake-installed-webextension-headers
-    mkdir -p ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension
-    COMMAND ln -n -s -f ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension/webkit2
-)
-
-add_custom_target(gtk-forwarding-headers
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include gtk
-)
+add_custom_target(webkit2gtk-forwarding-headers
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} soup
 
-add_custom_target(soup-forwarding-headers
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
+    # These symbolic link allows includes like #include <webkit2/WebkitWebView.h> which simulates installed headers.
+    COMMAND ln -n -s -f ${WEBKIT2_DIR}/UIProcess/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}/webkit2
+    COMMAND ln -n -s -f ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}/webkit2
 )
 
 set(WEBKIT2_EXTRA_DEPENDENCIES
-     fake-installed-headers
-     gtk-forwarding-headers
-     soup-forwarding-headers
-     fake-installed-webextension-headers
+     webkit2gtk-forwarding-headers
 )
 
 if (ENABLE_PLUGIN_PROCESS)
@@ -657,7 +640,8 @@ include_directories(
     "${DERIVED_SOURCES_DIR}"
     "${DERIVED_SOURCES_DIR}/InjectedBundle"
     "${DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR}"
-    "${DERIVED_SOURCES_WEBKIT2_DIR}/include"
+    "${FORWARDING_HEADERS_DIR}"
+    "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
 )
 
 add_library(webkit2gtkinjectedbundle MODULE
index 7f8b26c..fe56895 100644 (file)
@@ -1,4 +1,3 @@
-set(WEBKIT2_FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk)
 set(TEST_BINARY_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit2GObjectAPITests)
 set(TEST_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/WebKit2GObjectAPITests)
 set(TEST_RESOURCES_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/resources)
@@ -17,11 +16,10 @@ include_directories(
     ${CMAKE_SOURCE_DIR}/Source
     ${CMAKE_SOURCE_DIR}/Source/WTF
     ${DERIVED_SOURCES_DIR}
-    ${DERIVED_SOURCES_DIR}/ForwardingHeaders
-    ${DERIVED_SOURCES_DIR}/webkit2gtk
-    ${DERIVED_SOURCES_DIR}/WebKit2/include
-    ${WEBKIT2_FORWARDING_HEADERS_DIR}
-    ${WEBKIT2_FORWARDING_HEADERS_DIR}/webkit2extension
+    ${DERIVED_SOURCES_WEBKIT2GTK_DIR}
+    ${FORWARDING_HEADERS_DIR}
+    ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
+    ${FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR}
     ${ATSPI_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
     ${GTK3_INCLUDE_DIRS}
index 1085b8a..3136718 100644 (file)
@@ -195,3 +195,13 @@ if (ENABLE_INDEXED_DATABASE)
 endif ()
 
 set(CPACK_SOURCE_GENERATOR TBZ2)
+
+set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
+set(DERIVED_SOURCES_WEBKITGTK_DIR ${DERIVED_SOURCES_DIR}/webkitgtk)
+set(DERIVED_SOURCES_WEBKITGTK_API_DIR ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkit)
+set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
+set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/webkit2gtk)
+set(DERIVED_SOURCES_WEBKIT2GTK_API_DIR ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/webkit2)
+set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders)
+set(FORWARDING_HEADERS_WEBKIT2GTK_DIR ${FORWARDING_HEADERS_DIR}/webkit2gtk)
+set(FORWARDING_HEADERS_WEBKIT2GTK_EXTENSION_DIR ${FORWARDING_HEADERS_DIR}/webkit2gtk-webextension)
index 3d8c29b..8530c4b 100644 (file)
@@ -1,3 +1,24 @@
+2013-12-25  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Clean up generated sources directories
+        https://bugs.webkit.org/show_bug.cgi?id=126216
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * DumpRenderTree/PlatformGTK.cmake: Use the new derived sources variables.
+        * GtkLauncher/CMakeLists.txt: Ditto.
+        * MiniBrowser/gtk/CMakeLists.txt: Ditto.
+        * TestWebKitAPI/CMakeLists.txt: Now that the EFL and GTK+ forwarding header locations differ,
+        move the platform-specific includes to the EFL and GTK platform files. Also clean up forwarding
+        header generation into on target.
+        * TestWebKitAPI/PlatformEfl.cmake: Added EFL-specific locations to the include list.
+        * TestWebKitAPI/PlatformGTK.cmake: Added GTK-specific locations to the include list.
+        * WebKitTestRunner/CMakeLists.txt: Same as for TestWebKitAPI.
+        * WebKitTestRunner/PlatformEfl.cmake: Ditto.
+        * WebKitTestRunner/PlatformGTK.cmake: Ditto.
+        * gtk/generate-gtkdoc: Update to select the appropriate derived sources locations for
+        the cmake build.
+
 2013-12-23  Alexey Proskuryakov  <ap@apple.com>
 
         Add a JSON interface for getting EWS queue status
index 0ee617d..8671aa4 100644 (file)
@@ -30,6 +30,7 @@ list(APPEND DumpRenderTree_LIBRARIES
 
 list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
     ${DERIVED_SOURCES_DIR}
+    ${DERIVED_SOURCES_WEBKITGTK_DIR}
     ${WEBKIT_DIR}/gtk
     ${WEBCORE_DIR}/platform/gtk
     ${TOOLS_DIR}/DumpRenderTree/atk
index 5e8c80a..9ec3680 100644 (file)
@@ -6,7 +6,7 @@ include_directories(
     ${CMAKE_SOURCE_DIR}/Source/JavaScriptCore/ForwardingHeaders
     ${CMAKE_SOURCE_DIR}/Source/WebKit/gtk
     ${DERIVED_SOURCES_DIR}
-    ${DERIVED_SOURCES_DIR}/webkit
+    ${DERIVED_SOURCES_WEBKITGTK_DIR}
     ${GLIB_INCLUDE_DIRS}
     ${GTK3_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
index 4b64aec..7ff44a4 100644 (file)
@@ -20,9 +20,9 @@ set(MiniBrowser_SOURCES
 
 set(MiniBrowser_INCLUDE_DIRECTORIES
     ${DERIVED_SOURCES_MINIBROWSER_DIR}
-    ${DERIVED_SOURCES_DIR}/webkit2gtk
-    ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk
-    ${DERIVED_SOURCES_DIR}/ForwardingHeaders
+    ${DERIVED_SOURCES_WEBKIT2GTK_DIR}
+    ${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
+    ${FORWARDING_HEADERS_DIR}
     ${CMAKE_SOURCE_DIR}/Source
     ${GTK3_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
index 615f45e..6b4150e 100644 (file)
@@ -5,7 +5,6 @@ include_directories(${CMAKE_BINARY_DIR}
     ${TESTWEBKITAPI_DIR}
     ${CMAKE_SOURCE_DIR}/Source
     ${DERIVED_SOURCES_WEBCORE_DIR}
-    ${DERIVED_SOURCES_WEBKIT2_DIR}/include
     ${JAVASCRIPTCORE_DIR}
     ${JAVASCRIPTCORE_DIR}/API
     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
@@ -82,7 +81,7 @@ add_library(TestWebKitAPIInjectedBundle SHARED
 )
 
 target_link_libraries(TestWebKitAPIInjectedBundle ${TestWebKitAPI_LIBRARIES})
-add_dependencies(TestWebKitAPIInjectedBundle ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+add_dependencies(TestWebKitAPIInjectedBundle ${ForwardingHeadersForTestWebKitAPI_NAME})
 
 get_property(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
 
index 7ffc6cf..c3bd27b 100644 (file)
@@ -2,16 +2,13 @@ add_custom_target(forwarding-headersEflForTestWebKitAPI
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include CoordinatedGraphics
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
-)
-set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
-
-add_custom_target(forwarding-headersSoupForTestWebKitAPI
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
 )
-set(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
+set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
 
 include_directories(
+    ${DERIVED_SOURCES_WEBKIT2_DIR}/include
     ${WEBKIT2_DIR}/UIProcess/API/C/CoordinatedGraphics
     ${WEBKIT2_DIR}/UIProcess/API/C/soup
     ${WEBKIT2_DIR}/UIProcess/API/C/efl
index 4590edd..0243f8b 100644 (file)
@@ -3,18 +3,15 @@
 add_definitions(-DBUILDING_WEBKIT2__)
 
 add_custom_target(forwarding-headersGTKForTestWebKitAPI
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include gtk
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${FORWARDING_HEADERS_DIR}  gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${FORWARDING_HEADERS_DIR} soup
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${FORWARDING_HEADERS_DIR}  soup
 )
 set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersGTKForTestWebKitAPI)
 
-add_custom_target(forwarding-headersSoupForTestWebKitAPI
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
-)
-set(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
-
 include_directories(
+    ${FORWARDING_HEADERS_DIR}
     ${WEBKIT2_DIR}/UIProcess/API/C/soup
     ${WEBKIT2_DIR}/UIProcess/API/C/gtk
     ${WEBKIT2_DIR}/UIProcess/API/gtk
index bd16c32..f659506 100644 (file)
@@ -45,9 +45,6 @@ set(WebKitTestRunner_INCLUDE_DIRECTORIES
     ${WEBKIT2_DIR}/WebProcess/InjectedBundle
     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c
     ${WTF_DIR}
-    ${DERIVED_SOURCES_WEBCORE_DIR}
-    ${DERIVED_SOURCES_WEBCORE_DIR}/include
-    ${DERIVED_SOURCES_WEBKIT2_DIR}/include
     ${DERIVED_SOURCES_DIR}/InjectedBundle
     ${CMAKE_BINARY_DIR}
     ${CMAKE_SOURCE_DIR}/Source
@@ -104,4 +101,3 @@ add_executable(WebKitTestRunner ${WebKitTestRunner_SOURCES})
 target_link_libraries(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
 
 add_dependencies(WebKit2 ${ForwardingHeadersForWebKitTestRunner_NAME})
-add_dependencies(WebKit2 ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
index 1742566..1818a5d 100644 (file)
@@ -1,12 +1,8 @@
 add_custom_target(forwarding-headersEflForWebKitTestRunner
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
-)
-set(ForwardingHeadersForWebKitTestRunner_NAME forwarding-headersEflForWebKitTestRunner)
-
-add_custom_target(forwarding-headersSoupForWebKitTestRunner
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
 )
-set(ForwardingNetworkHeadersForWebKitTestRunner_NAME forwarding-headersSoupForWebKitTestRunner)
+set(ForwardingHeadersForWebKitTestRunner_NAME forwarding-headersEflForWebKitTestRunner)
 
 list(APPEND WebKitTestRunner_SOURCES
     ${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
@@ -18,6 +14,10 @@ list(APPEND WebKitTestRunner_SOURCES
 )
 
 list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+    ${DERIVED_SOURCES_WEBCORE_DIR}
+    ${DERIVED_SOURCES_WEBCORE_DIR}/include
+    ${DERIVED_SOURCES_WEBKIT2_DIR}/include
+
     ${WEBKIT2_DIR}/UIProcess/API/C/efl
 
     ${TOOLS_DIR}/DumpRenderTree/efl/
index 873458a..d7c494d 100644 (file)
@@ -1,12 +1,8 @@
-add_custom_target(gtk-forwarding-headers-for-WebKitTestRunner
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include gtk
+add_custom_target(WebKitTestRunner-forwarding-headers
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${FORWARDING_HEADERS_DIR} gtk
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${FORWARDING_HEADERS_DIR} soup
 )
-set(ForwardingHeadersForWebKitTestRunner_NAME gtk-forwarding-headers-for-WebKitTestRunner)
-
-add_custom_target(soup-forwarding-headers-for-WebKitTestRunner
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
-)
-set(ForwardingNetworkHeadersForWebKitTestRunner_NAME soup-forwarding-headers-for-WebKitTestRunner)
+set(ForwardingHeadersForWebKitTestRunner_NAME WebKitTestRunner-forwarding-headers)
 
 list(APPEND WebKitTestRunner_SOURCES
     ${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
@@ -22,6 +18,7 @@ list(APPEND WebKitTestRunner_SOURCES
 )
 
 list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+    ${FORWARDING_HEADERS_DIR}
     ${WTF_DIR}/wtf/gobject
     ${ATK_INCLUDE_DIRS}
     ${CAIRO_INCLUDE_DIRS}
index 280749b..ce220a6 100755 (executable)
@@ -76,33 +76,42 @@ def webkitdom_docs_html_path():
     return common.build_path('Documentation', 'webkitdomgtk', 'html')
 
 def get_webkit2_options():
-    def derived_sources_path(*args):
-        return common.build_path(*(('DerivedSources', 'WebKit2') + args))
-    def src_path(*args):
-        return common.top_level_path(*(('Source', 'WebKit2', 'UIProcess', 'API', 'gtk') + args))
-    def injected_bundle_src_path(*args):
-        return common.top_level_path(*(('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk') + args))
+    api_path = common.top_level_path('Source', 'WebKit2', 'UIProcess', 'API', 'gtk')
+    injected_bundle_api_path = common.top_level_path('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk')
+
+    if common.is_cmake_build():
+        generated_api_path = common.build_path('DerivedSources', 'webkit2gtk', 'webkit2')
+    else:
+        generated_api_path = common.build_path('DerivedSources', 'WebKit2', 'webkit2gtk', 'webkit2')
 
     xref_deps = get_common_xref_deps().copy()
     xref_deps.update({
         'gtk+-3.0' : ['gtk3', 'gdk3']
     })
 
+    def src_path(*args):
+        return os.path.join(api_path, *args)
+
     options = get_common_options().copy()
     options.update({
         'module_name' : 'webkit2gtk',
         'namespace' : 'webkit',
         'doc_dir' : src_path('docs'),
         'output_dir' : common.build_path('Documentation', 'webkit2gtk'),
-        'source_dirs' : [src_path(), derived_sources_path('webkit2gtk', 'webkit2'), injected_bundle_src_path()],
-        'cflags' : ' -I' + derived_sources_path('webkit2gtk', 'include') + \
-                   ' -I' + derived_sources_path('webkit2gtk') + \
-                   ' -I' + derived_sources_path('include') + \
-                   ' -I' + common.top_level_path('Source') + \
-                   ' -I' + src_path(),
+        'source_dirs' : [src_path(), generated_api_path, injected_bundle_api_path],
+        'cflags' :
+            # Common paths
+            ' -I' + common.top_level_path('Source') + \
+            ' -I' + api_path + \
+            # Autotools paths
+            ' -I' + common.build_path('DerivedSources', 'webkit2gtk', 'include') + \
+            ' -I' + common.build_path('DerivedSources', 'WebKit2', 'webkit2gtk') + \
+            # CMake paths
+            ' -I' + common.build_path('DerivedSources', 'ForwardingHeaders', 'webkit2gtk') + \
+            ' -I' + common.build_path('DerivedSources', 'webkit2gtk'),
         'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps) + [webkitdom_docs_html_path()],
         'ignored_files': glob.glob(src_path('*Private.h')) + \
-                         glob.glob(injected_bundle_src_path('*Private.h')) + \
+                         glob.glob(os.path.join(injected_bundle_api_path, '*Private.h')) + \
                          glob.glob(src_path('*Client*')) + \
                          glob.glob(src_path('WebKitAuthenticationDialog.*')) + \
                          glob.glob(src_path('WebKitBatteryProvider.*')) + \
@@ -110,8 +119,8 @@ def get_webkit2_options():
                          glob.glob(src_path('WebKitTextChecker.*')) + \
                          glob.glob(src_path('WebKitWebViewBaseAccessible.*')) + \
                          glob.glob(src_path('WebViewBaseInputMethodFilter.*')) + \
-                         glob.glob(derived_sources_path('webkit2gtk', 'webkit2', 'WebKitMarshal.*')) + \
-                         glob.glob(derived_sources_path('webkit2gtk', 'webkit2', 'WebKitEnumTypes.*')) + \
+                         glob.glob(os.path.join(generated_api_path, 'WebKitMarshal.*')) + \
+                         glob.glob(os.path.join(generated_api_path, 'WebKitEnumTypes.*')) + \
                          glob.glob(src_path('tests/*.h'))
     })
     return options
@@ -122,7 +131,7 @@ def get_webkit1_options(gtk_version):
 
     def webkitversionh_path():
         if common.is_cmake_build():
-            return common.build_path('DerivedSources', 'webkit')
+            return common.build_path('DerivedSources', 'webkitgtk')
         else:
             return common.build_path('Source', 'WebKit', 'gtk', 'webkit')