Commit 9073fea3 authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

[GTK] [CMake] Build the plugin process against GTK+ 2

https://bugs.webkit.org/show_bug.cgi?id=116374

Reviewed by Gustavo Noronha Silva.

.:

* Source/cmake/FindGDK2.cmake: Added.
* Source/cmake/FindGTK2.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Look for GTK2 and GDK2.
* Source/cmake/WebKitMacros.cmake: Abstract WebKit2 IPC generation here so it
can be shared between the WebKit2 library and the plugin process.

Source/WebCore:

* PlatformGTK.cmake: Split off the GTK+-dependent sources into
libWebCorePlatformGTK and compile libWebCorePlatformGTK2 when
WebKit2 is enabled.

Source/WebKit2:

* CMakeLists.txt: Use the new GENERATE_WEBKIT2_MESSAGE_SOURCES macro so we
can share messaging file generation with the plugin process.
* PlatformGTK.cmake: Add more files to the plugin process source list. Properly
generate message sources, add the appropriate include paths, defines, and libraries
for the plugin process.

Tools:

* TestWebKitAPI/PlatformGTK.cmake: Add WebCorePlatformGTK to the list of
libraries required for WebCore unit tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160728 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a0780b5f
2013-12-12 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Build the plugin process against GTK+ 2
https://bugs.webkit.org/show_bug.cgi?id=116374
Reviewed by Gustavo Noronha Silva.
* Source/cmake/FindGDK2.cmake: Added.
* Source/cmake/FindGTK2.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Look for GTK2 and GDK2.
* Source/cmake/WebKitMacros.cmake: Abstract WebKit2 IPC generation here so it
can be shared between the WebKit2 library and the plugin process.
2013-12-17 Simon Pena <simon.pena@samsung.com>
[NIX] Enable full debug builds by having ar creating thin archives
......
2013-12-12 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Build the plugin process against GTK+ 2
https://bugs.webkit.org/show_bug.cgi?id=116374
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Split off the GTK+-dependent sources into
libWebCorePlatformGTK and compile libWebCorePlatformGTK2 when
WebKit2 is enabled.
2013-12-17 Alex Christensen <achristensen@webkit.org>
Compile fix for WebGL on Windows without GRAPHICS_SURFACE.
......@@ -22,35 +22,13 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
)
list(APPEND WebCore_SOURCES
accessibility/atk/AXObjectCacheAtk.cpp
accessibility/atk/AccessibilityObjectAtk.cpp
accessibility/atk/WebKitAccessibleHyperlink.cpp
accessibility/atk/WebKitAccessibleInterfaceAction.cpp
accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
accessibility/atk/WebKitAccessibleInterfaceImage.cpp
accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
accessibility/atk/WebKitAccessibleInterfaceTable.cpp
accessibility/atk/WebKitAccessibleInterfaceText.cpp
accessibility/atk/WebKitAccessibleInterfaceValue.cpp
accessibility/atk/WebKitAccessibleUtil.cpp
accessibility/atk/WebKitAccessibleWrapperAtk.cpp
editing/SmartReplaceICU.cpp
editing/atk/FrameSelectionAtk.cpp
html/shadow/MediaControlsGtk.cpp
loader/soup/CachedRawResourceSoup.cpp
loader/soup/SubresourceLoaderSoup.cpp
page/gtk/DragControllerGtk.cpp
page/gtk/EventHandlerGtk.cpp
platform/Cursor.cpp
platform/PlatformStrategies.cpp
......@@ -59,11 +37,6 @@ list(APPEND WebCore_SOURCES
platform/audio/gstreamer/FFTFrameGStreamer.cpp
platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
platform/audio/gtk/AudioBusGtk.cpp
platform/cairo/WidgetBackingStoreCairo.cpp
platform/graphics/GLContext.cpp
platform/graphics/GraphicsContext3DPrivate.cpp
platform/graphics/OpenGLShims.cpp
platform/graphics/WOFFFileFormat.cpp
......@@ -75,7 +48,6 @@ list(APPEND WebCore_SOURCES
platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
platform/graphics/cairo/GradientCairo.cpp
platform/graphics/cairo/GraphicsContext3DCairo.cpp
platform/graphics/cairo/GraphicsContextCairo.cpp
platform/graphics/cairo/ImageBufferCairo.cpp
platform/graphics/cairo/ImageCairo.cpp
platform/graphics/cairo/IntRectCairo.cpp
......@@ -89,32 +61,17 @@ list(APPEND WebCore_SOURCES
platform/graphics/cairo/TiledBackingStoreBackendCairo.cpp
platform/graphics/cairo/TransformationMatrixCairo.cpp
platform/graphics/egl/GLContextEGL.cpp
platform/graphics/freetype/FontCacheFreeType.cpp
platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
platform/graphics/freetype/FontPlatformDataFreeType.cpp
platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
platform/graphics/freetype/SimpleFontDataFreeType.cpp
platform/graphics/glx/GLContextGLX.cpp
platform/graphics/gstreamer/GRefPtrGStreamer.cpp
platform/graphics/gstreamer/GStreamerUtilities.cpp
platform/graphics/gstreamer/ImageGStreamerCairo.cpp
platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
platform/graphics/gstreamer/VideoSinkGStreamer.cpp
platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
platform/graphics/gtk/ColorGtk.cpp
platform/graphics/gtk/GdkCairoUtilities.cpp
platform/graphics/gtk/IconGtk.cpp
platform/graphics/gtk/ImageBufferGtk.cpp
platform/graphics/gtk/ImageGtk.cpp
platform/graphics/gtk/IntPointGtk.cpp
platform/graphics/gtk/IntRectGtk.cpp
platform/graphics/harfbuzz/HarfBuzzFace.cpp
platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
platform/graphics/harfbuzz/HarfBuzzShaper.cpp
......@@ -127,6 +84,87 @@ list(APPEND WebCore_SOURCES
platform/graphics/opentype/OpenTypeVerticalData.cpp
platform/image-decoders/cairo/ImageDecoderCairo.cpp
platform/linux/GamepadDeviceLinux.cpp
platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
platform/network/soup/AuthenticationChallengeSoup.cpp
platform/network/soup/CookieJarSoup.cpp
platform/network/soup/CookieStorageSoup.cpp
platform/network/soup/CredentialStorageSoup.cpp
platform/network/soup/DNSSoup.cpp
platform/network/soup/GOwnPtrSoup.cpp
platform/network/soup/NetworkStorageSessionSoup.cpp
platform/network/soup/ProxyResolverSoup.cpp
platform/network/soup/ProxyServerSoup.cpp
platform/network/soup/ResourceErrorSoup.cpp
platform/network/soup/ResourceHandleSoup.cpp
platform/network/soup/ResourceRequestSoup.cpp
platform/network/soup/ResourceResponseSoup.cpp
platform/network/soup/SocketStreamHandleSoup.cpp
platform/network/soup/SoupURIUtils.cpp
platform/network/soup/SynchronousLoaderClientSoup.cpp
platform/soup/SharedBufferSoup.cpp
platform/text/LocaleICU.cpp
platform/text/TextBreakIteratorICU.cpp
platform/text/TextCodecICU.cpp
platform/text/TextEncodingDetectorICU.cpp
platform/text/enchant/TextCheckerEnchant.cpp
)
list(APPEND WebCorePlatformGTK_SOURCES
accessibility/atk/AXObjectCacheAtk.cpp
accessibility/atk/AccessibilityObjectAtk.cpp
accessibility/atk/WebKitAccessibleHyperlink.cpp
accessibility/atk/WebKitAccessibleInterfaceAction.cpp
accessibility/atk/WebKitAccessibleInterfaceComponent.cpp
accessibility/atk/WebKitAccessibleInterfaceDocument.cpp
accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp
accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp
accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp
accessibility/atk/WebKitAccessibleInterfaceImage.cpp
accessibility/atk/WebKitAccessibleInterfaceSelection.cpp
accessibility/atk/WebKitAccessibleInterfaceTable.cpp
accessibility/atk/WebKitAccessibleInterfaceText.cpp
accessibility/atk/WebKitAccessibleInterfaceValue.cpp
accessibility/atk/WebKitAccessibleUtil.cpp
accessibility/atk/WebKitAccessibleWrapperAtk.cpp
editing/atk/FrameSelectionAtk.cpp
page/gtk/DragControllerGtk.cpp
page/gtk/EventHandlerGtk.cpp
platform/audio/gtk/AudioBusGtk.cpp
platform/cairo/WidgetBackingStoreCairo.cpp
platform/graphics/GLContext.cpp
platform/graphics/cairo/GraphicsContextCairo.cpp
platform/graphics/egl/GLContextEGL.cpp
platform/graphics/freetype/FontPlatformDataFreeType.cpp
platform/graphics/glx/GLContextGLX.cpp
platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
platform/graphics/gtk/ColorGtk.cpp
platform/graphics/gtk/GdkCairoUtilities.cpp
platform/graphics/gtk/IconGtk.cpp
platform/graphics/gtk/ImageBufferGtk.cpp
platform/graphics/gtk/ImageGtk.cpp
platform/graphics/gtk/IntPointGtk.cpp
platform/graphics/gtk/IntRectGtk.cpp
platform/gtk/ClipboardUtilitiesGtk.cpp
platform/gtk/ContextMenuGtk.cpp
platform/gtk/ContextMenuItemGtk.cpp
......@@ -180,12 +218,6 @@ list(APPEND WebCore_SOURCES
platform/gtk/WidgetGtk.cpp
platform/gtk/WidgetRenderingContext.cpp
platform/image-decoders/cairo/ImageDecoderCairo.cpp
platform/linux/GamepadDeviceLinux.cpp
platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp
platform/network/gtk/CredentialBackingStore.cpp
platform/network/soup/AuthenticationChallengeSoup.cpp
......@@ -225,7 +257,9 @@ if (ENABLE_NETSCAPE_PLUGIN_API)
plugins/PluginPackage.cpp
plugins/PluginStream.cpp
plugins/PluginView.cpp
)
list(APPEND WebCorePlatformGTK_SOURCES
plugins/gtk/PluginPackageGtk.cpp
plugins/gtk/PluginViewGtk.cpp
plugins/gtk/gtk2xtbin.c
......@@ -251,7 +285,6 @@ list(APPEND WebCore_LIBRARIES
${GLIB_GMODULE_LIBRARIES}
${GLIB_GOBJECT_LIBRARIES}
${GLIB_LIBRARIES}
${GTK3_LIBRARIES}
${HARFBUZZ_LIBRARIES}
${ICU_LIBRARIES}
${JPEG_LIBRARIES}
......@@ -279,7 +312,6 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
${LIBXSLT_INCLUDE_DIR}
${SQLITE_INCLUDE_DIR}
${GLIB_INCLUDE_DIRS}
${GTK3_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${HARFBUZZ_INCLUDE_DIRS}
......@@ -362,6 +394,47 @@ if (ENABLE_WEB_AUDIO)
"${DATA_INSTALL_DIR}/resources/audio")
endif ()
if (ENABLE_WEBKIT2)
# WebKit2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
# dependent files into a separate library which can be used to construct a GTK+2 WebCore
# for the plugin process.
add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK2)
set_property(TARGET WebCorePlatformGTK2
APPEND
PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
)
set_property(
TARGET WebCorePlatformGTK2
APPEND
PROPERTY INCLUDE_DIRECTORIES
${WebCore_INCLUDE_DIRECTORIES}
${GTK2_INCLUDE_DIRS}
${GDK2_INCLUDE_DIRS}
)
target_link_libraries(WebCorePlatformGTK2
${WebCore_LIBRARIES}
${GTK2_LIBRARIES}
${GDK2_LIBRARIES}
)
endif ()
add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCorePlatformGTK)
set_property(
TARGET WebCorePlatformGTK
APPEND
PROPERTY INCLUDE_DIRECTORIES
${WebCore_INCLUDE_DIRECTORIES}
${GTK3_INCLUDE_DIRS}
${GDK3_INCLUDE_DIRS}
)
target_link_libraries(WebCorePlatformGTK
${WebCore_LIBRARIES}
${GTK3_LIBRARIES}
${GDK3_LIBRARIES}
)
if (ENABLE_WEBKIT2)
set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
......
......@@ -683,23 +683,7 @@ endif ()
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
# Create JavaScript C++ code given an IDL input
foreach (_file ${WebKit2_MESSAGES_IN_FILES})
get_filename_component(_name ${_file} NAME_WE)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
MAIN_DEPENDENCY ${_file}
DEPENDS ${WEBKIT2_DIR}/Scripts/webkit2/__init__.py
${WEBKIT2_DIR}/Scripts/webkit2/messages.py
${WEBKIT2_DIR}/Scripts/webkit2/model.py
${WEBKIT2_DIR}/Scripts/webkit2/parser.py
COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-message-receiver.py ${_file} > ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp
COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-messages-header.py ${_file} > ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
WORKING_DIRECTORY ${WEBKIT2_DIR}
VERBATIM)
list(APPEND WebKit2_SOURCES ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp)
endforeach ()
GENERATE_WEBKIT2_MESSAGE_SOURCES(WebKit2_SOURCES "${WebKit2_MESSAGES_IN_FILES}")
add_definitions(-DBUILDING_WEBKIT)
include_directories(${WebKit2_INCLUDE_DIRECTORIES})
......
2013-12-12 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Build the plugin process against GTK+ 2
https://bugs.webkit.org/show_bug.cgi?id=116374
Reviewed by Gustavo Noronha Silva.
* CMakeLists.txt: Use the new GENERATE_WEBKIT2_MESSAGE_SOURCES macro so we
can share messaging file generation with the plugin process.
* PlatformGTK.cmake: Add more files to the plugin process source list. Properly
generate message sources, add the appropriate include paths, defines, and libraries
for the plugin process.
2013-12-17 Anders Carlsson <andersca@apple.com>
Back out r159982
......
......@@ -399,15 +399,29 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
${WTF_DIR}
${CAIRO_INCLUDE_DIRS}
${ENCHANT_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
set(WebKit2CommonIncludeDirectories ${WebKit2_INCLUDE_DIRECTORIES})
list(APPEND WebKit2_INCLUDE_DIRECTORIES
${GLIB_INCLUDE_DIRS}
${GTK3_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
list(APPEND WebProcess_SOURCES
gtk/MainGtk.cpp
)
set(SharedWebKit2Libraries
${WebKit2_LIBRARIES}
)
list(APPEND WebKit2_LIBRARIES
GObjectDOMBindings
WebCorePlatformGTK
)
set(WebKit2_MARSHAL_LIST ${WEBKIT2_DIR}/UIProcess/API/gtk/webkit2marshal.list)
add_custom_command(
OUTPUT ${WEBKIT2_BUILT_API_DIR}/WebKitMarshal.cpp
......@@ -458,8 +472,6 @@ set(WEBKIT2_EXTRA_DEPENDENCIES
)
if (ENABLE_PLUGIN_PROCESS)
add_definitions(-DENABLE_PLUGIN_PROCESS=1)
set(PluginProcess_EXECUTABLE_NAME WebKitPluginProcess)
list(APPEND PluginProcess_INCLUDE_DIRECTORIES
"${WEBKIT2_DIR}/PluginProcess/unix"
......@@ -467,16 +479,134 @@ if (ENABLE_PLUGIN_PROCESS)
include_directories(${PluginProcess_INCLUDE_DIRECTORIES})
# FIXME: We should figure out a way to avoid compiling files that are common between the plugin
# process and WebKit2 only once instead of recompiling them for the plugin process.
list(APPEND PluginProcess_SOURCES
${WEBKIT2_DIR}/unix/PluginMainUnix.cpp
Platform/CoreIPC/ArgumentCoders.cpp
Platform/CoreIPC/ArgumentDecoder.cpp
Platform/CoreIPC/ArgumentEncoder.cpp
Platform/CoreIPC/Attachment.cpp
Platform/CoreIPC/Connection.cpp
Platform/CoreIPC/MessageDecoder.cpp
Platform/CoreIPC/MessageEncoder.cpp
Platform/CoreIPC/MessageReceiverMap.cpp
Platform/CoreIPC/MessageSender.cpp
Platform/CoreIPC/unix/AttachmentUnix.cpp
Platform/CoreIPC/unix/ConnectionUnix.cpp
Platform/IPC/DataReference.cpp
Platform/IPC/StringReference.cpp
Platform/Logging.cpp
Platform/Module.cpp
Platform/WorkQueue.cpp
Platform/gtk/LoggingGtk.cpp
Platform/gtk/ModuleGtk.cpp
Platform/gtk/WorkQueueGtk.cpp
Platform/unix/SharedMemoryUnix.cpp
PluginProcess/PluginControllerProxy.cpp
PluginProcess/PluginCreationParameters.cpp
PluginProcess/PluginProcess.cpp
PluginProcess/WebProcessConnection.cpp
PluginProcess/unix/PluginControllerProxyUnix.cpp
PluginProcess/unix/PluginProcessMainUnix.cpp
PluginProcess/unix/PluginProcessUnix.cpp
Shared/ActivityAssertion.cpp
Shared/ChildProcess.cpp
Shared/ChildProcessProxy.cpp
Shared/ConnectionStack.cpp
Shared/Plugins/NPIdentifierData.cpp
Shared/Plugins/NPObjectMessageReceiver.cpp
Shared/Plugins/NPObjectProxy.cpp
Shared/Plugins/NPRemoteObjectMap.cpp
Shared/Plugins/NPVariantData.cpp
Shared/Plugins/Netscape/NetscapePluginModule.cpp
Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
Shared/Plugins/PluginProcessCreationParameters.cpp
Shared/ShareableBitmap.cpp
Shared/WebCoreArgumentCoders.cpp
Shared/WebEvent.cpp
Shared/WebKeyboardEvent.cpp
Shared/WebKit2Initialize.cpp
Shared/WebMouseEvent.cpp
Shared/WebWheelEvent.cpp
Shared/cairo/ShareableBitmapCairo.cpp
Shared/gtk/NativeWebKeyboardEventGtk.cpp
Shared/gtk/NativeWebMouseEventGtk.cpp
Shared/gtk/NativeWebWheelEventGtk.cpp
Shared/gtk/ProcessExecutablePathGtk.cpp
Shared/gtk/WebEventFactory.cpp
Shared/soup/CertificateInfo.cpp
Shared/soup/WebCoreArgumentCodersSoup.cpp
UIProcess/Launcher/ProcessLauncher.cpp
UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp
UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
WebProcess/Plugins/Netscape/NetscapePlugin.cpp
WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
WebProcess/Plugins/Plugin.cpp
unix/PluginMainUnix.cpp
unix/PluginMainUnix.cpp
)
set(PluginProcess_LIBRARIES
WebKit2
list(APPEND PluginProcess_MESSAGES_IN_FILES
Shared/Plugins/NPObjectMessageReceiver.messages.in
PluginProcess/PluginControllerProxy.messages.in
PluginProcess/PluginProcess.messages.in
PluginProcess/WebProcessConnection.messages.in
)
GENERATE_WEBKIT2_MESSAGE_SOURCES(PluginProcess_SOURCES "${PluginProcess_MESSAGES_IN_FILES}")
add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
target_link_libraries(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_LIBRARIES})
# We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but
# we only want GTK_API_VERSION_2 for the plugin process target.
add_definitions(-DENABLE_PLUGIN_PROCESS=1)
set_property(
TARGET ${PluginProcess_EXECUTABLE_NAME}
APPEND
PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
)
set_property(
TARGET ${PluginProcess_EXECUTABLE_NAME}
APPEND
PROPERTY INCLUDE_DIRECTORIES
${WebKit2CommonIncludeDirectories}
${GTK2_INCLUDE_DIRS}
${GDK2_INCLUDE_DIRS}
)
target_link_libraries(${PluginProcess_EXECUTABLE_NAME}
${SharedWebKit2Libraries}
WebCorePlatformGTK2
WebCore
)
add_dependencies(${PluginProcess_EXECUTABLE_NAME} WebKit2)
install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
endif () # ENABLE_PLUGIN_PROCESS
......@@ -498,4 +628,3 @@ add_library(webkit2gtkinjectedbundle MODULE
"${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp"
)
add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings)
list(APPEND WebKit2_LIBRARIES GObjectDOMBindings)
# - Try to find GDK 2
# Once done, this will define
#
# GDK2_FOUND - system has GDK 2
# GDK2_INCLUDE_DIRS - the GDK 2 include directories
# GDK2_LIBRARIES - link these to use GDK 2
#
# 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(GDK2 gdk-2.0)
set(VERSION_OK TRUE)
if (GDK2_VERSION)
if (GDK2_FIND_VERSION_EXACT)
if (NOT("${GDK2_FIND_VERSION}" VERSION_EQUAL "${GDK2_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${GDK2_VERSION}" VERSION_LESS "${GDK2_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDK2 DEFAULT_MSG GDK2_INCLUDE_DIRS GDK2_LIBRARIES VERSION_OK)
# - Try to find GTK+ 2
# Once done, this will define
#
# GTK2_FOUND - system has GTK+ 2.
# GTK2_INCLUDE_DIRS - the GTK+ 2. include directories
# GTK2_LIBRARIES - link these to use GTK+ 2.
#
# 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(GTK2 gtk+-2.0)
set(VERSION_OK TRUE)
if (GTK2_VERSION)
if (GTK2_FIND_VERSION_EXACT)
if (NOT("${GTK2_FIND_VERSION}" VERSION_EQUAL "${GTK2_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${GTK2_VERSION}" VERSION_LESS "${GTK2_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2 DEFAULT_MSG GTK2_INCLUDE_DIRS GTK2_LIBRARIES VERSION_OK)
......@@ -105,6 +105,8 @@ find_package(Freetype 2.4.2 REQUIRED)
find_package(GLIB 2.33.2 REQUIRED COMPONENTS gio gobject gthread gmodule)
find_package(GTK3 3.6.0 REQUIRED)
find_package(GDK3 3.6.0 REQUIRED)
find_package(GTK2 2.24.10 REQUIRED)
find_package(GDK2 2.24.10 REQUIRED)
find_package(HarfBuzz 0.9.2 REQUIRED)
find_package(ICU REQUIRED)
find_package(JPEG REQUIRED)
......
......@@ -248,3 +248,25 @@ macro(WEBKIT_CREATE_FORWARDING_HEADERS _framework)
endif ()
endforeach ()
endmacro()
# Helper macro which wraps generate-message-receiver.py and generate-message-header.py scripts
# _output_source is a list name which will contain generated sources.(eg. WebKit2_SOURCES)
# _input_files are messages.in files to generate.
macro(GENERATE_WEBKIT2_MESSAGE_SOURCES _output_source _input_files)
foreach (_file ${_input_files})
get_filename_component(_name ${_file} NAME_WE)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
MAIN_DEPENDENCY ${_file}
DEPENDS ${WEBKIT2_DIR}/Scripts/webkit2/__init__.py
${WEBKIT2_DIR}/Scripts/webkit2/messages.py
${WEBKIT2_DIR}/Scripts/webkit2/model.py
${WEBKIT2_DIR}/Scripts/webkit2/parser.py
COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-message-receiver.py ${_file} > ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp
COMMAND ${PYTHON_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-messages-header.py ${_file} > ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}Messages.h
WORKING_DIRECTORY ${WEBKIT2_DIR}
VERBATIM)
list(APPEND ${_output_source} ${DERIVED_SOURCES_WEBKIT2_DIR}/${_name}MessageReceiver.cpp)
endforeach ()
endmacro()
2013-12-12 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Build the plugin process against GTK+ 2
https://bugs.webkit.org/show_bug.cgi?id=116374
Reviewed by Gustavo Noronha Silva.
* TestWebKitAPI/PlatformGTK.cmake: Add WebCorePlatformGTK to the list of
libraries required for WebCore unit tests.
2013-12-17 Brent Fulgham <bfulgham@apple.com>
[Win] Revise filter-build-webkit to deal with Windows build logs
......
......@@ -50,6 +50,7 @@ list(APPEND test_webkit2_api_LIBRARIES
)
list(APPEND test_webcore_LIBRARIES
WebCorePlatformGTK
${GDK3_LIBRARIES}
${GTK3_LIBRARIES}
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment