[GTK] [CMake] Add support for building WebKit2
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 18:49:40 +0000 (18:49 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 May 2013 18:49:40 +0000 (18:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116372

Reviewed by Gustavo Noronha Silva.

.:

* Source/cmake/FindWebP.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Turn on WebKit2 and the plugin process and also look
for WebP. These missing symbols were hidden up until now. ENABLE_TEXTURE_MAPPER was
also incorrect specified.

Source/WebCore:

* PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.

Source/WebKit2:

* CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
installed header step.
* PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
list. Fix up forwarding header dependencies now.
* PlatformGTK.cmake: Added.
* config.h: First check whether this is a CMake build and then fall back to the autotools header.

Tools:

* CMakeLists.txt: Do not build WebKitTestRunner yet for WebKitGTK+.
* MiniBrowser/gtk/CMakeLists.txt: Added.

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

13 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/PlatformGTK.cmake [new file with mode: 0644]
Source/WebKit2/config.h
Source/cmake/FindWebP.cmake [new file with mode: 0644]
Source/cmake/OptionsGTK.cmake
Tools/CMakeLists.txt
Tools/ChangeLog
Tools/MiniBrowser/gtk/CMakeLists.txt [new file with mode: 0644]

index 4b0de6c..c32c336 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2013-05-21  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Add support for building WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=116372
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * Source/cmake/FindWebP.cmake: Added.
+        * Source/cmake/OptionsGTK.cmake: Turn on WebKit2 and the plugin process and also look
+        for WebP. These missing symbols were hidden up until now. ENABLE_TEXTURE_MAPPER was
+        also incorrect specified.
+
 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Compile everything in C++11 mode
index 734d789..5acb7e4 100644 (file)
@@ -1,3 +1,12 @@
+2013-05-21  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Add support for building WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=116372
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
+
 2013-05-21  Jer Noble  <jer.noble@apple.com>
 
         REGRESSION(r101810): Media controls status text missing for live-stream videos.
index 91ef747..2a8b845 100644 (file)
@@ -5,6 +5,8 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/cairo"
     "${WEBCORE_DIR}/platform/gtk"
     "${WEBCORE_DIR}/platform/graphics/cairo"
+    "${WEBCORE_DIR}/platform/graphics/egl"
+    "${WEBCORE_DIR}/platform/graphics/glx"
     "${WEBCORE_DIR}/platform/graphics/gtk"
     "${WEBCORE_DIR}/platform/graphics/freetype"
     "${WEBCORE_DIR}/platform/graphics/harfbuzz/"
@@ -114,6 +116,7 @@ list(APPEND WebCore_SOURCES
     platform/graphics/cairo/DrawingBufferCairo.cpp
     platform/graphics/cairo/FontCairo.cpp
     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
+    platform/graphics/cairo/GLContext.cpp
     platform/graphics/cairo/GradientCairo.cpp
     platform/graphics/cairo/GraphicsContext3DCairo.cpp
     platform/graphics/cairo/GraphicsContext3DPrivate.cpp
@@ -131,6 +134,10 @@ list(APPEND WebCore_SOURCES
     platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
     platform/graphics/cairo/TransformationMatrixCairo.cpp
 
+    platform/graphics/egl/GLContextEGL.cpp
+
+    platform/graphics/glx/GLContextGLX.cpp
+
     platform/graphics/gtk/ColorGtk.cpp
     platform/graphics/gtk/FullscreenVideoControllerGtk.cpp
     platform/graphics/gtk/GdkCairoUtilities.cpp
@@ -247,6 +254,7 @@ list(APPEND WebCore_LIBRARIES
     ${LIBSOUP_LIBRARIES}
     ${ZLIB_LIBRARIES}
     ${HARFBUZZ_LIBRARIES}
+    ${WEBP_LIBRARIES}
     ${XT_LIBRARIES}
     ${X11_X11_LIB}
     ${X11_Xcomposite_LIB}
@@ -269,6 +277,7 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     ${LIBSOUP_INCLUDE_DIRS}
     ${ZLIB_INCLUDE_DIRS}
     ${HARFBUZZ_INCLUDE_DIRS}
+    ${WEBP_INCLUDE_DIRS}
     ${XT_INCLUDE_DIRS}
 )
 
index 9ad1505..f494e7d 100644 (file)
@@ -1,4 +1,5 @@
 set(WebKit2_INCLUDE_DIRECTORIES
+    "${JAVASCRIPTCORE_DIR}/llint"
     "${WEBKIT2_DIR}"
     "${WEBKIT2_DIR}/Platform"
     "${WEBKIT2_DIR}/Platform/CoreIPC"
@@ -95,6 +96,7 @@ set(WebKit2_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/rendering/style"
     "${WEBCORE_DIR}/storage"
     "${WEBCORE_DIR}/svg"
+    "${WEBCORE_DIR}/svg/graphics"
     "${WEBCORE_DIR}/svg/properties"
     "${JAVASCRIPTCORE_DIR}"
     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
@@ -120,6 +122,13 @@ set(WebKit2_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
 )
 
+if (WTF_USE_3D_GRAPHICS)
+    list(APPEND WebKit2_INCLUDE_DIRECTORIES
+        "${THIRDPARTY_DIR}/ANGLE/include/KHR"
+        "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
+    )
+endif ()
+
 set(WebKit2_SOURCES
     Platform/Logging.cpp
     Platform/Module.cpp
@@ -245,7 +254,6 @@ set(WebKit2_SOURCES
     UIProcess/GeolocationPermissionRequestManagerProxy.cpp
     UIProcess/GeolocationPermissionRequestProxy.cpp
 
-    UIProcess/PageViewportController.cpp
     UIProcess/ResponsivenessTimer.cpp
     UIProcess/StatisticsRequest.cpp
     UIProcess/TextCheckerCompletion.cpp
@@ -623,8 +631,7 @@ include_directories(${WebKit2_INCLUDE_DIRECTORIES})
 add_library(WebKit2 ${WebKit2_LIBRARY_TYPE} ${WebKit2_SOURCES})
 
 add_dependencies(WebKit2 WebCore)
-add_dependencies(WebKit2 ${ForwardingHeaders_NAME})
-add_dependencies(WebKit2 ${ForwardingNetworkHeaders_NAME})
+add_dependencies(WebKit2 WEBKIT2_EXTRA_DEPENDENCIES)
 target_link_libraries(WebKit2 ${WebKit2_LIBRARIES})
 set_target_properties(WebKit2 PROPERTIES FOLDER "WebKit")
 set_target_properties(WebKit2 PROPERTIES LINK_INTERFACE_LIBRARIES "")
index d60dfb7..d93d59f 100644 (file)
@@ -1,3 +1,19 @@
+2013-05-21  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Add support for building WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=116372
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
+        from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
+        dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
+        installed header step.
+        * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
+        list. Fix up forwarding header dependencies now.
+        * PlatformGTK.cmake: Added.
+        * config.h: First check whether this is a CMake build and then fall back to the autotools header.
+
 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
 
         [GTK] Compile everything in C++11 mode
index 575106b..9b6b9e5 100644 (file)
@@ -41,6 +41,7 @@ list(APPEND WebKit2_SOURCES
     Shared/soup/WebCoreArgumentCodersSoup.cpp
 
     UIProcess/DefaultUndoController.cpp
+    UIProcess/PageViewportController.cpp
 
     Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
 
@@ -177,12 +178,10 @@ list(APPEND WebKit2_MESSAGES_IN_FILES
 )
 
 list(APPEND WebKit2_INCLUDE_DIRECTORIES
-    "${JAVASCRIPTCORE_DIR}/llint"
     "${WEBCORE_DIR}/platform/efl"
     "${WEBCORE_DIR}/platform/graphics/cairo"
     "${WEBCORE_DIR}/platform/network/soup"
     "${WEBCORE_DIR}/platform/text/enchant"
-    "${WEBCORE_DIR}/svg/graphics"
     "${WEBKIT2_DIR}/Shared/API/c/efl"
     "${WEBKIT2_DIR}/Shared/Downloads/soup"
     "${WEBKIT2_DIR}/Shared/efl"
@@ -222,13 +221,6 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
     ${WTF_DIR}
 )
 
-if (WTF_USE_3D_GRAPHICS)
-    list(APPEND WebKit2_INCLUDE_DIRECTORIES
-        "${THIRDPARTY_DIR}/ANGLE/include/KHR"
-        "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
-    )
-endif ()
-
 list(APPEND WebKit2_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
@@ -295,12 +287,15 @@ add_custom_target(forwarding-headerEfl
     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
 )
-set(ForwardingHeaders_NAME forwarding-headerEfl)
 
 add_custom_target(forwarding-headerSoup
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
 )
-set(ForwardingNetworkHeaders_NAME forwarding-headerSoup)
+
+set(WEBKIT2_EXTRA_DEPENDENCIES
+     forwarding-headerEfl
+     forwarding-headerSoup
+)
 
 configure_file(efl/ewebkit2.pc.in ${CMAKE_BINARY_DIR}/WebKit2/efl/ewebkit2.pc @ONLY)
 set(EWebKit2_HEADERS
diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
new file mode 100644 (file)
index 0000000..150e023
--- /dev/null
@@ -0,0 +1,410 @@
+set(WebProcess_EXECUTABLE_NAME WebKitWebProcess)
+set(DERIVED_SOURCES_WEBKIT2GTK_DIR ${DERIVED_SOURCES_DIR}/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})
+
+configure_file(UIProcess/API/gtk/WebKitVersion.h.in ${WEBKIT2_BUILT_API_DIR}/WebKitVersion.h)
+
+add_definitions(-DWEBKIT2_COMPILATION)
+add_definitions(-DLIBEXECDIR="${CMAKE_INSTALL_FULL_LIBEXECDIR}")
+add_definitions(-DPACKAGE_LOCALE_DIR="${CMAKE_INSTALL_FULL_LOCALEDIR}")
+add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
+
+list(APPEND WebKit2_SOURCES
+    ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
+    ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
+    Platform/gtk/LoggingGtk.cpp
+    Platform/gtk/ModuleGtk.cpp
+    Platform/gtk/WorkQueueGtk.cpp
+    Platform/unix/SharedMemoryUnix.cpp
+    WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
+    WebProcess/WebPage/gtk/WebPageGtk.cpp
+    WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
+    WebProcess/WebPage/gtk/WebInspectorGtk.cpp
+    WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp
+    WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp
+    WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp
+    WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp
+    WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp
+    WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp
+    UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp
+    UIProcess/API/C/gtk/WKInspectorClientGtk.cpp
+    UIProcess/gtk/WebContextMenuProxyGtk.cpp
+    UIProcess/gtk/WebContextGtk.cpp
+    UIProcess/gtk/WebPageProxyGtk.cpp
+    UIProcess/gtk/WebPreferencesGtk.cpp
+    UIProcess/gtk/WebFullScreenClientGtk.cpp
+    UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp
+    UIProcess/gtk/WebInspectorProxyGtk.cpp
+    UIProcess/gtk/TextCheckerGtk.cpp
+    UIProcess/gtk/WebPopupMenuProxyGtk.cpp
+    UIProcess/gtk/WebInspectorClientGtk.cpp
+    UIProcess/gtk/WebProcessProxyGtk.cpp
+    UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
+    UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp
+
+    Shared/API/c/gtk/WKGraphicsContextGtk.cpp
+    Shared/Downloads/gtk/DownloadSoupErrorsGtk.cpp
+    Shared/gtk/ArgumentCodersGtk.cpp
+    Shared/gtk/LayerTreeContextGtk.cpp
+    Shared/gtk/NativeWebKeyboardEventGtk.cpp
+    Shared/gtk/NativeWebMouseEventGtk.cpp
+    Shared/gtk/NativeWebWheelEventGtk.cpp
+    Shared/gtk/PrintInfoGtk.cpp
+    Shared/gtk/ProcessExecutablePathGtk.cpp
+    Shared/gtk/WebEventFactory.cpp
+
+    Platform/CoreIPC/unix/ConnectionUnix.cpp
+    Platform/CoreIPC/unix/AttachmentUnix.cpp
+    PluginProcess/unix/PluginControllerProxyUnix.cpp
+    PluginProcess/unix/PluginProcessMainUnix.cpp
+    PluginProcess/unix/PluginProcessUnix.cpp
+    Shared/API/c/cairo/WKImageCairo.cpp
+    Shared/Downloads/soup/DownloadSoup.cpp
+    Shared/cairo/ShareableBitmapCairo.cpp
+    Shared/linux/SeccompFilters/OpenSyscall.cpp
+    Shared/linux/SeccompFilters/SigactionSyscall.cpp
+    Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp
+    Shared/linux/SeccompFilters/SeccompBroker.cpp
+    Shared/linux/SeccompFilters/SeccompFilters.cpp
+    Shared/linux/SeccompFilters/Syscall.cpp
+    Shared/linux/SeccompFilters/SyscallPolicy.cpp
+    Shared/linux/WebMemorySamplerLinux.cpp
+    Shared/soup/PlatformCertificateInfo.cpp
+    Shared/soup/WebCoreArgumentCodersSoup.cpp
+    UIProcess/DefaultUndoController.cpp
+    Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
+    UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
+    UIProcess/API/C/CoordinatedGraphics/WKView.cpp
+    UIProcess/API/C/soup/WKContextSoup.cpp
+    UIProcess/API/C/soup/WKCookieManagerSoup.cpp
+    UIProcess/API/C/soup/WKSoupRequestManager.cpp
+    UIProcess/cairo/BackingStoreCairo.cpp
+    UIProcess/CoordinatedGraphics/WebView.cpp
+    UIProcess/CoordinatedGraphics/WebViewClient.cpp
+    UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp
+    UIProcess/soup/WebCookieManagerProxySoup.cpp
+    UIProcess/soup/WebSoupRequestManagerClient.cpp
+    UIProcess/soup/WebSoupRequestManagerProxy.cpp
+    UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
+    UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
+    UIProcess/Storage/StorageManager.cpp
+    WebProcess/Cookies/soup/WebCookieManagerSoup.cpp
+    WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
+    WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
+    WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
+    WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
+    WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
+    WebProcess/soup/WebProcessSoup.cpp
+    WebProcess/soup/WebSoupRequestManager.cpp
+    WebProcess/soup/WebKitSoupRequestGeneric.cpp
+    WebProcess/soup/WebKitSoupRequestInputStream.cpp
+
+    UIProcess/API/gtk/PageClientImpl.cpp
+    UIProcess/API/gtk/PageClientImpl.h
+    UIProcess/API/gtk/webkit2.h
+    UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
+    UIProcess/API/gtk/WebKitAuthenticationDialog.h
+    UIProcess/API/gtk/WebKitBackForwardList.cpp
+    UIProcess/API/gtk/WebKitBackForwardList.h
+    UIProcess/API/gtk/WebKitBackForwardListItem.cpp
+    UIProcess/API/gtk/WebKitBackForwardListItem.h
+    UIProcess/API/gtk/WebKitBackForwardListPrivate.h
+    UIProcess/API/gtk/WebKitContextMenuActions.cpp
+    UIProcess/API/gtk/WebKitContextMenuActions.h
+    UIProcess/API/gtk/WebKitContextMenuActionsPrivate.h
+    UIProcess/API/gtk/WebKitContextMenuClient.cpp
+    UIProcess/API/gtk/WebKitContextMenuClient.h
+    UIProcess/API/gtk/WebKitContextMenu.cpp
+    UIProcess/API/gtk/WebKitContextMenu.h
+    UIProcess/API/gtk/WebKitContextMenuItem.cpp
+    UIProcess/API/gtk/WebKitContextMenuItem.h
+    UIProcess/API/gtk/WebKitContextMenuItemPrivate.h
+    UIProcess/API/gtk/WebKitContextMenuPrivate.h
+    UIProcess/API/gtk/WebKitCookieManager.cpp
+    UIProcess/API/gtk/WebKitCookieManager.h
+    UIProcess/API/gtk/WebKitCookieManagerPrivate.h
+    UIProcess/API/gtk/WebKitDefines.h
+    UIProcess/API/gtk/WebKitDownloadClient.cpp
+    UIProcess/API/gtk/WebKitDownloadClient.h
+    UIProcess/API/gtk/WebKitDownload.cpp
+    UIProcess/API/gtk/WebKitDownload.h
+    UIProcess/API/gtk/WebKitDownloadPrivate.h
+    UIProcess/API/gtk/WebKitEditingCommands.h
+    UIProcess/API/gtk/WebKitError.cpp
+    UIProcess/API/gtk/WebKitError.h
+    UIProcess/API/gtk/WebKitFaviconDatabase.cpp
+    UIProcess/API/gtk/WebKitFaviconDatabase.h
+    UIProcess/API/gtk/WebKitFaviconDatabasePrivate.h
+    UIProcess/API/gtk/WebKitFileChooserRequest.cpp
+    UIProcess/API/gtk/WebKitFileChooserRequest.h
+    UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h
+    UIProcess/API/gtk/WebKitFindController.cpp
+    UIProcess/API/gtk/WebKitFindController.h
+    UIProcess/API/gtk/WebKitFormClient.cpp
+    UIProcess/API/gtk/WebKitFormClient.h
+    UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp
+    UIProcess/API/gtk/WebKitFormSubmissionRequest.h
+    UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h
+    UIProcess/API/gtk/WebKitForwardDeclarations.h
+    UIProcess/API/gtk/WebKitFullscreenClient.cpp
+    UIProcess/API/gtk/WebKitFullscreenClient.h
+    UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp
+    UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
+    UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h
+    UIProcess/API/gtk/WebKitGeolocationProvider.cpp
+    UIProcess/API/gtk/WebKitGeolocationProvider.h
+    UIProcess/API/gtk/WebKitHitTestResult.cpp
+    UIProcess/API/gtk/WebKitHitTestResult.h
+    UIProcess/API/gtk/WebKitHitTestResultPrivate.h
+    UIProcess/API/gtk/WebKitInjectedBundleClient.cpp
+    UIProcess/API/gtk/WebKitInjectedBundleClient.h
+    UIProcess/API/gtk/WebKitJavascriptResult.cpp
+    UIProcess/API/gtk/WebKitJavascriptResult.h
+    UIProcess/API/gtk/WebKitJavascriptResultPrivate.h
+    UIProcess/API/gtk/WebKitLoaderClient.cpp
+    UIProcess/API/gtk/WebKitLoaderClient.h
+    UIProcess/API/gtk/WebKitMimeInfo.cpp
+    UIProcess/API/gtk/WebKitMimeInfo.h
+    UIProcess/API/gtk/WebKitMimeInfoPrivate.h
+    UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp
+    UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
+    UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h
+    UIProcess/API/gtk/WebKitPermissionRequest.cpp
+    UIProcess/API/gtk/WebKitPermissionRequest.h
+    UIProcess/API/gtk/WebKitPlugin.cpp
+    UIProcess/API/gtk/WebKitPlugin.h
+    UIProcess/API/gtk/WebKitPluginPrivate.h
+    UIProcess/API/gtk/WebKitPolicyClient.cpp
+    UIProcess/API/gtk/WebKitPolicyClient.h
+    UIProcess/API/gtk/WebKitPolicyDecision.cpp
+    UIProcess/API/gtk/WebKitPolicyDecision.h
+    UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h
+    UIProcess/API/gtk/WebKitPrintOperation.cpp
+    UIProcess/API/gtk/WebKitPrintOperation.h
+    UIProcess/API/gtk/WebKitPrintOperationPrivate.h
+    UIProcess/API/gtk/WebKitPrivate.cpp
+    UIProcess/API/gtk/WebKitPrivate.h
+    UIProcess/API/gtk/WebKitRequestManagerClient.cpp
+    UIProcess/API/gtk/WebKitRequestManagerClient.h
+    UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
+    UIProcess/API/gtk/WebKitResponsePolicyDecision.h
+    UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h
+    UIProcess/API/gtk/WebKitScriptDialog.cpp
+    UIProcess/API/gtk/WebKitScriptDialog.h
+    UIProcess/API/gtk/WebKitScriptDialogPrivate.h
+    UIProcess/API/gtk/WebKitSecurityManager.cpp
+    UIProcess/API/gtk/WebKitSecurityManager.h
+    UIProcess/API/gtk/WebKitSecurityManagerPrivate.h
+    UIProcess/API/gtk/WebKitSettings.cpp
+    UIProcess/API/gtk/WebKitSettings.h
+    UIProcess/API/gtk/WebKitSettingsPrivate.h
+    UIProcess/API/gtk/WebKitTextChecker.cpp
+    UIProcess/API/gtk/WebKitTextChecker.h
+    UIProcess/API/gtk/WebKitUIClient.cpp
+    UIProcess/API/gtk/WebKitUIClient.h
+    UIProcess/API/gtk/WebKitURIRequest.cpp
+    UIProcess/API/gtk/WebKitURIRequest.h
+    UIProcess/API/gtk/WebKitURIRequestPrivate.h
+    UIProcess/API/gtk/WebKitURIResponse.cpp
+    UIProcess/API/gtk/WebKitURIResponse.h
+    UIProcess/API/gtk/WebKitURIResponsePrivate.h
+    UIProcess/API/gtk/WebKitURISchemeRequest.cpp
+    UIProcess/API/gtk/WebKitURISchemeRequest.h
+    UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h
+    UIProcess/API/gtk/WebKitVersion.cpp
+    UIProcess/API/gtk/WebKitVersion.h.in
+    UIProcess/API/gtk/WebKitWebContext.cpp
+    UIProcess/API/gtk/WebKitWebContext.h
+    UIProcess/API/gtk/WebKitWebContextPrivate.h
+    UIProcess/API/gtk/WebKitWebInspector.cpp
+    UIProcess/API/gtk/WebKitWebInspector.h
+    UIProcess/API/gtk/WebKitWebInspectorPrivate.h
+    UIProcess/API/gtk/WebKitWebResource.cpp
+    UIProcess/API/gtk/WebKitWebResource.h
+    UIProcess/API/gtk/WebKitWebResourcePrivate.h
+    UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp
+    UIProcess/API/gtk/WebKitWebViewBaseAccessible.h
+    UIProcess/API/gtk/WebKitWebViewBase.cpp
+    UIProcess/API/gtk/WebKitWebViewBase.h
+    UIProcess/API/gtk/WebKitWebViewBasePrivate.h
+    UIProcess/API/gtk/WebKitWebView.cpp
+    UIProcess/API/gtk/WebKitWebViewGroup.cpp
+    UIProcess/API/gtk/WebKitWebViewGroup.h
+    UIProcess/API/gtk/WebKitWebViewGroupPrivate.h
+    UIProcess/API/gtk/WebKitWebView.h
+    UIProcess/API/gtk/WebKitWebViewPrivate.h
+    UIProcess/API/gtk/WebKitWindowProperties.cpp
+    UIProcess/API/gtk/WebKitWindowProperties.h
+    UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h
+    UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp
+    UIProcess/API/gtk/WebViewBaseInputMethodFilter.h
+
+    UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp
+    UIProcess/API/C/gtk/WKInspectorClientGtk.cpp
+    UIProcess/API/C/gtk/WKView.cpp
+
+    WebProcess/gtk/WebProcessMainGtk.cpp
+)
+
+set(WebKit2_INSTALLED_HEADERS
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenu.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuActions.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitContextMenuItem.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitCookieManager.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDefines.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitDownload.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEditingCommands.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitError.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFaviconDatabase.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFileChooserRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFindController.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitJavascriptResult.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitMimeInfo.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitNavigationPolicyDecision.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPermissionRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPlugin.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPolicyDecision.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitPrintOperation.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitResponsePolicyDecision.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitScriptDialog.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSecurityManager.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitSettings.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURIResponse.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitURISchemeRequest.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebContext.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebInspector.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebResource.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebView.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewBase.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWebViewGroup.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitWindowProperties.h
+    ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2.h
+
+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h
+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h
+    ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
+)
+
+list(APPEND WebKit2_MESSAGES_IN_FILES
+    UIProcess/soup/WebSoupRequestManagerProxy.messages.in
+    WebProcess/soup/WebSoupRequestManager.messages.in
+)
+
+# 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_BUILT_API_DIR}"
+    "${DERIVED_SOURCES_WEBKIT2GTK_DIR}"
+)
+
+list(APPEND WebKit2_INCLUDE_DIRECTORIES
+    "${WEBCORE_DIR}/platform/gtk"
+    "${WEBCORE_DIR}/platform/graphics/cairo"
+    "${WEBCORE_DIR}/platform/network/soup"
+    "${WEBCORE_DIR}/platform/text/enchant"
+    "${WEBKIT2_DIR}/Shared/API/c/gtk"
+    "${WEBKIT2_DIR}/Shared/Downloads/soup"
+    "${WEBKIT2_DIR}/Shared/gtk"
+    "${WEBKIT2_DIR}/Shared/soup"
+    "${WEBKIT2_DIR}/UIProcess/API/C/cairo"
+    "${WEBKIT2_DIR}/UIProcess/API/C/gtk"
+    "${WEBKIT2_DIR}/UIProcess/API/C/soup"
+    "${WEBKIT2_DIR}/UIProcess/API/cpp/gtk"
+    "${WEBKIT2_DIR}/UIProcess/API/gtk"
+    "${WEBKIT2_DIR}/UIProcess/gtk"
+    "${WEBKIT2_DIR}/UIProcess/soup"
+    "${WEBKIT2_DIR}/WebProcess/gtk"
+    "${WEBKIT2_DIR}/WebProcess/soup"
+    "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/gtk"
+    "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
+    "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
+    "${WEBKIT2_DIR}/WebProcess/WebPage/gtk"
+    "${WTF_DIR}/wtf/gtk/"
+    "${WTF_DIR}/wtf/gobject"
+    ${WTF_DIR}
+    ${CAIRO_INCLUDE_DIRS}
+    ${ENCHANT_INCLUDE_DIRS}
+    ${GLIB_INCLUDE_DIRS}
+    ${GTK3_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
+)
+
+list(APPEND WebProcess_SOURCES
+    gtk/MainGtk.cpp
+)
+
+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
+    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 glib-genmarshal --prefix=webkit_marshal ${WebKit2_MARSHAL_LIST} --header > ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.h
+    VERBATIM)
+
+add_custom_command(
+    OUTPUT ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.h
+           ${WEBKIT2_BUILT_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.cpp.template ${WebKit2_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${WEBKIT2_BUILT_API_DIR}/WebKitEnumTypes.cpp
+    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(gtk-forwarding-headers
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include gtk
+)
+
+add_custom_target(soup-forwarding-headers
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
+)
+
+set(WEBKIT2_EXTRA_DEPENDENCIES
+     gtk-forwarding-headers
+     soup-forwarding-headers
+     fake-installed-headers
+)
+
+if (ENABLE_PLUGIN_PROCESS)
+    add_definitions(-DENABLE_PLUGIN_PROCESS=1)
+
+    set(PluginProcess_EXECUTABLE_NAME WebKitPluginProcess)
+    list(APPEND PluginProcess_INCLUDE_DIRECTORIES
+        "${WEBKIT2_DIR}/PluginProcess/unix"
+    )
+
+    include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
+
+    list(APPEND PluginProcess_SOURCES
+        ${WEBKIT2_DIR}/unix/PluginMainUnix.cpp
+    )
+
+    set(PluginProcess_LIBRARIES ${WebKit2_LIBRARY_NAME})
+
+    add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
+    target_link_libraries(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_LIBRARIES})
+    install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
+endif () # ENABLE_PLUGIN_PROCESS
index 4bf2bd8..c80c29e 100644 (file)
  * THE POSSIBILITY OF SUCH DAMAGE.
  */ 
 
-#if defined (BUILDING_GTK__)
-#include "autotoolsconfig.h"
-#endif /* defined (BUILDING_GTK__) */
-
-#if defined (BUILDING_WITH_CMAKE)
+#if defined(BUILDING_WITH_CMAKE)
 #include "cmakeconfig.h"
+#elif defined(BUILDING_GTK__)
+#include "autotoolsconfig.h"
 #endif
 
 #include <runtime/JSExportMacros.h>
diff --git a/Source/cmake/FindWebP.cmake b/Source/cmake/FindWebP.cmake
new file mode 100644 (file)
index 0000000..3ef11d9
--- /dev/null
@@ -0,0 +1,46 @@
+# - Try to find WebP.
+# Once done, this will define
+#
+#  WEBP_FOUND - system has WebP.
+#  WEBP_INCLUDE_DIRS - the WebP. include directories
+#  WEBP_LIBRARIES - link these to use WebP.
+#
+# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
+# Copyright (C) 2013 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_package(PkgConfig)
+pkg_check_modules(WEBP libwebp)
+
+if (NOT(WEBP_FOUND))
+    # Older installations of libwebp do not install a pkgconfig file, so we fall
+    # back to a manual search for a libwebp header file.
+    check_include_files("webp/decode.h" WEBP_FOUND)
+    if (WEBP_FOUND)
+        set(WEBP_LIBRARIES "-lwebp")
+    endif ()
+endif ()
+
+# WEBP_INCLUDE_DIRS is often empty, so we rely only on WEBP_LIBRARIES.
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WEBP DEFAULT_MSG WEBP_LIBRARIES)
index a803f0d..df66d9a 100644 (file)
@@ -71,9 +71,9 @@ set(WEBKIT_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
 
 set(ENABLE_WEBCORE ON)
 set(ENABLE_INSPECTOR ON)
-set(ENABLE_PLUGIN_PROCESS OFF)
+set(ENABLE_PLUGIN_PROCESS ON)
 set(ENABLE_WEBKIT OFF)
-set(ENABLE_WEBKIT2 OFF)
+set(ENABLE_WEBKIT2 ON)
 
 set(WTF_USE_ICU_UNICODE 1)
 set(WTF_USE_SOUP 1)
@@ -118,6 +118,7 @@ find_package(Threads REQUIRED)
 find_package(ZLIB REQUIRED)
 find_package(Xt REQUIRED)
 find_package(ATK REQUIRED)
+find_package(WebP REQUIRED)
 find_package(GStreamer 1.0.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 
 # We don't use find_package for GLX because it is part of -lGL, unlike EGL.
@@ -142,7 +143,7 @@ endif ()
 
 if (${OPENGL_FOUND} AND (${GLX_FOUND} OR ${EGL_FOUND}))
     set(ENABLE_WEBGL 1)
-    set(WTF_USE_TEXTURE_MAPPER 1)
+    set(ENABLE_TEXTURE_MAPPER 1)
     set(WTF_USE_3D_GRAPHICS 1)
 
     add_definitions(-DWTF_USE_OPENGL=1)
index d0527d4..5ce79a9 100644 (file)
@@ -1,4 +1,4 @@
-if (ENABLE_WEBKIT2)
+if (ENABLE_WEBKIT2 AND NOT("${PORT}" STREQUAL "GTK"))
     add_subdirectory(WebKitTestRunner)
 endif ()
 
@@ -15,6 +15,10 @@ if ("${PORT}" STREQUAL "Efl")
         add_subdirectory(MiniBrowser/efl)
     endif ()
     add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
+elseif ("${PORT}" STREQUAL "GTK")
+    if (ENABLE_WEBKIT2)
+        add_subdirectory(MiniBrowser/gtk)
+    endif ()
 elseif ("${PORT}" STREQUAL "WinCE")
     add_subdirectory(WinCELauncher)
 endif ()
index dad4339..47fae1e 100644 (file)
@@ -1,3 +1,13 @@
+2013-05-21  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Add support for building WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=116372
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * CMakeLists.txt: Do not build WebKitTestRunner yet for WebKitGTK+.
+        * MiniBrowser/gtk/CMakeLists.txt: Added.
+
 2013-05-21  Jessie Berlin  <jberlin@apple.com>
 
         Revert r149635, it was too optimistic.
diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f8e3f48
--- /dev/null
@@ -0,0 +1,51 @@
+set(MINIBROWSER_DIR "${TOOLS_DIR}/MiniBrowser/gtk")
+set(DERIVED_SOURCES_MINIBROWSER_DIR "${CMAKE_BINARY_DIR}/DerivedSources/MiniBrowser")
+
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_MINIBROWSER_DIR})
+
+set(MiniBrowser_SOURCES
+    ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c
+    ${MINIBROWSER_DIR}/BrowserCellRendererVariant.h
+    ${MINIBROWSER_DIR}/BrowserCellRendererVariant.c
+    ${MINIBROWSER_DIR}/BrowserDownloadsBar.h
+    ${MINIBROWSER_DIR}/BrowserDownloadsBar.c
+    ${MINIBROWSER_DIR}/BrowserSettingsDialog.h
+    ${MINIBROWSER_DIR}/BrowserSettingsDialog.c
+    ${MINIBROWSER_DIR}/BrowserWindow.h
+    ${MINIBROWSER_DIR}/BrowserWindow.c
+    ${MINIBROWSER_DIR}/main.c
+)
+
+set(MiniBrowser_INCLUDE_DIRECTORIES
+    ${DERIVED_SOURCES_MINIBROWSER_DIR}
+    ${DERIVED_SOURCES_DIR}/webkit2gtk
+    ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk
+    ${DERIVED_SOURCES_DIR}/ForwardingHeaders
+    ${CMAKE_SOURCE_DIR}/Source
+    ${GTK3_INCLUDE_DIRS}
+    ${GLIB_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
+)
+
+set(MiniBrowser_LIBRARIES
+    ${JavaScriptCore_LIBRARY_NAME}
+    ${WebKit2_LIBRARY_NAME}
+    ${GTK3_LIBRARIES}
+    ${GLIB_LIBRARIES}
+)
+
+add_custom_command(
+    OUTPUT ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c
+           ${DERIVED_SOURCES_MINIBROWSER_DIR}/Browsermarshal.h
+    MAIN_DEPENDENCY ${MINIBROWSER_DIR}/browser-marshal.list
+    COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --body > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c
+    COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --header > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.h
+    VERBATIM)
+
+add_definitions(-DWEBKIT_EXEC_PATH="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+add_definitions(-DWEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+
+include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
+add_executable(MiniBrowser ${MiniBrowser_SOURCES})
+target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")