[GTK] [CMake] Ensure that the autotools build and the CMake install the same files
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jan 2014 00:25:34 +0000 (00:25 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Jan 2014 00:25:34 +0000 (00:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=116379

Reviewed by Gustavo Noronha Silva.

.:

* Source/PlatformGTK.cmake: Install the documentation.
* Source/cmake/OptionsCommon.cmake: Add a LIBEXEC variable for WebKit2 executables, and
don't use the default locations on GTK+. We will get them from the CMake-provided GNU installation
variables.
* Source/cmake/OptionsGTK.cmake: Setup the installation variables using the ones provided
by CMake's GNU installation directory support. Fix the definition of DATADIR. Always install
the jsc binary.

Source/JavaScriptCore:

* PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file.

Source/WebCore:

* PlatformGTK.cmake: Reformat some install directives to be consistent with the rest of them.
Install the GObject DOM bindings headers.

Source/WebKit:

* PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file. Move
a couple installed and generated headers to the installed headers list.

Source/WebKit2:

* CMakeLists.txt: Install the plugin process to the new LIBEXEC directory, which
for non-GTK+ platforms is the same as EXEC.
* PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file. Move
a couple installed and generated headers to the installed headers list. Rename the
headers list to be consistent with the WebKit1 build. No longer use a variable for
the name of the plugin process, as it's unnecessary.

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

13 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformGTK.cmake
Source/PlatformGTK.cmake
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformGTK.cmake
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake
Source/cmake/OptionsCommon.cmake
Source/cmake/OptionsGTK.cmake

index 29d0e1b..ac03177 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2014-01-05  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
+        https://bugs.webkit.org/show_bug.cgi?id=116379
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * Source/PlatformGTK.cmake: Install the documentation.
+        * Source/cmake/OptionsCommon.cmake: Add a LIBEXEC variable for WebKit2 executables, and
+        don't use the default locations on GTK+. We will get them from the CMake-provided GNU installation
+        variables.
+        * Source/cmake/OptionsGTK.cmake: Setup the installation variables using the ones provided
+        by CMake's GNU installation directory support. Fix the definition of DATADIR. Always install
+        the jsc binary.
+
 2014-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Stop installing WebKit2 C API headers
index 5111555..433e2d9 100644 (file)
@@ -1,3 +1,12 @@
+2014-01-05  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
+        https://bugs.webkit.org/show_bug.cgi?id=116379
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file.
+
 2014-01-04  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Use Compiler macros instead of raw "final" and "override"
index 5f4146c..0f105e2 100644 (file)
@@ -8,3 +8,24 @@ add_custom_command(
 )
 
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib)
+
+install(FILES "${CMAKE_BINARY_DIR}/Source/JavaScriptCore/javascriptcoregtk-3.0.pc"
+        DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
+)
+
+install(FILES API/JavaScript.h
+              API/JSBase.h
+              API/JSContextRef.h
+              API/JSObjectRef.h
+              API/JSStringRef.h
+              API/JSValueRef.h
+              API/WebKitAvailability.h
+        DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/JavaScriptCore"
+)
+
+install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
+        DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
+)
+install(FILES ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
+        DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
+)
index 82c6b9e..3f443b4 100644 (file)
@@ -22,6 +22,9 @@ if (ENABLE_WEBKIT)
         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-docs.sgml"
         "${CMAKE_SOURCE_DIR}/Source/WebKit/gtk/docs/webkitgtk-sections.txt"
     )
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkitgtk/html/
+            DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkitgtk
+    )
 endif ()
 
 if (ENABLE_WEBKIT2)
@@ -30,6 +33,9 @@ if (ENABLE_WEBKIT2)
         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml"
         "${CMAKE_SOURCE_DIR}/Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt"
     )
+    install(DIRECTORY ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk/html/
+            DESTINATION ${CMAKE_INSTALL_DATADIR}/gtk-doc/html/webkit2gtk
+    )
 endif ()
 
 add_custom_command(
index 47c292e..412803f 100644 (file)
@@ -1,3 +1,13 @@
+2014-01-05  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
+        https://bugs.webkit.org/show_bug.cgi?id=116379
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Reformat some install directives to be consistent with the rest of them.
+        Install the GObject DOM bindings headers.
+
 2014-01-05  Andreas Kling  <akling@apple.com>
 
         Use lineageOfType to simplify two rendering helpers.
index 4c478dc..341451d 100644 (file)
@@ -385,22 +385,20 @@ if (WTF_USE_EGL)
     )
 endif ()
 
-install(FILES
-            "${WEBCORE_DIR}/Resources/textAreaResizeCorner.png"
-            "${WEBCORE_DIR}/Resources/nullPlugin.png"
-            "${WEBCORE_DIR}/Resources/urlIcon.png"
-            "${WEBCORE_DIR}/Resources/missingImage.png"
-            "${WEBCORE_DIR}/Resources/panIcon.png"
-            "${WEBCORE_DIR}/Resources/deleteButton.png"
-            "${WEBCORE_DIR}/Resources/inputSpeech.png"
-        DESTINATION
-            "${DATA_INSTALL_DIR}/images")
+install(FILES "${WEBCORE_DIR}/Resources/textAreaResizeCorner.png"
+              "${WEBCORE_DIR}/Resources/nullPlugin.png"
+              "${WEBCORE_DIR}/Resources/urlIcon.png"
+              "${WEBCORE_DIR}/Resources/missingImage.png"
+              "${WEBCORE_DIR}/Resources/panIcon.png"
+              "${WEBCORE_DIR}/Resources/deleteButton.png"
+              "${WEBCORE_DIR}/Resources/inputSpeech.png"
+        DESTINATION "${DATA_INSTALL_DIR}/images"
+)
 
 if (ENABLE_WEB_AUDIO)
-    install(FILES
-                "${WEBCORE_DIR}/platform/audio/resources/Composite.wav"
-            DESTINATION
-                "${DATA_INSTALL_DIR}/resources/audio")
+    install(FILES "${WEBCORE_DIR}/platform/audio/resources/Composite.wav"
+            DESTINATION "${DATA_INSTALL_DIR}/resources/audio"
+    )
 endif ()
 
 if (ENABLE_WEBKIT2)
@@ -696,5 +694,12 @@ if (ENABLE_WEBKIT2)
         WebCore
         fake-installed-webkitdom-headers
     )
+
+    install(FILES ${GObjectDOMBindings_INSTALLED_HEADERS}
+                  bindings/gobject/WebKitDOMEventTarget.h
+                  bindings/gobject/WebKitDOMDeprecated.h
+                  bindings/gobject/WebKitDOMObject.h
+            DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkitdom"
+    )
 endif ()
 
index e6eb8b3..b519de0 100644 (file)
@@ -1,3 +1,13 @@
+2014-01-05  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
+        https://bugs.webkit.org/show_bug.cgi?id=116379
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file. Move
+        a couple installed and generated headers to the installed headers list.
+
 2014-01-04  Martin Robinson  <mrobinson@igalia.com>
 
         [GTK] [CMake] Improve the way we locate gobject-introspection
index 2d56b52..b458508 100644 (file)
@@ -93,6 +93,8 @@ list(APPEND WebKit_SOURCES
 )
 
 list(APPEND WebKitGTK_INSTALLED_HEADERS
+    ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.h
+    ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitversion.h
     ${WEBKIT_DIR}/gtk/webkit/webkit.h
     ${WEBKIT_DIR}/gtk/webkit/webkitapplicationcache.h
     ${WEBKIT_DIR}/gtk/webkit/webkitdefines.h
@@ -194,7 +196,6 @@ add_custom_command(
         -I${DERIVED_SOURCES_WEBKITGTK_DIR}
         -I${WEBCORE_DIR}/platform/gtk
         ${GObjectDOMBindings_INSTALLED_HEADERS}
-        ${DERIVED_SOURCES_WEBKITGTK_API_DIR}/webkitenumtypes.h
         ${WebKitGTK_INSTALLED_HEADERS}
         ${WEBKIT_DIR}/gtk/webkit/*.cpp
 )
@@ -206,3 +207,19 @@ add_custom_command(
 )
 
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit-3.0.typelib)
+
+install(FILES "${CMAKE_BINARY_DIR}/Source/WebKit/gtk/webkitgtk-3.0.pc"
+        DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
+)
+install(FILES "${WEBKIT_DIR}/gtk/resources/error.html"
+        DESTINATION "${DATA_INSTALL_DIR}/resources"
+)
+install(FILES ${WebKitGTK_INSTALLED_HEADERS}
+        DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit"
+)
+install(FILES ${CMAKE_BINARY_DIR}/WebKit-3.0.gir
+        DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
+)
+install(FILES ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
+        DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
+)
index 080b0da..9369b42 100644 (file)
@@ -709,4 +709,4 @@ POPULATE_LIBRARY_VERSION(WEBKIT2)
 set_target_properties(WebKit2 PROPERTIES VERSION ${WEBKIT2_VERSION} SOVERSION ${WEBKIT2_VERSION_MAJOR})
 
 install(TARGETS WebKit2 DESTINATION "${LIB_INSTALL_DIR}")
-install(TARGETS WebProcess DESTINATION "${EXEC_INSTALL_DIR}")
+install(TARGETS WebProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
index cff39f8..61fc42b 100644 (file)
@@ -1,3 +1,17 @@
+2014-01-05  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Ensure that the autotools build and the CMake install the same files
+        https://bugs.webkit.org/show_bug.cgi?id=116379
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * CMakeLists.txt: Install the plugin process to the new LIBEXEC directory, which
+        for non-GTK+ platforms is the same as EXEC.
+        * PlatformGTK.cmake: Install API headers, gir files, and the pkg-config file. Move
+        a couple installed and generated headers to the installed headers list. Rename the
+        headers list to be consistent with the WebKit1 build. No longer use a variable for
+        the name of the plugin process, as it's unnecessary.
+
 2014-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Stop installing WebKit2 C API headers
index 1893d81..630d413 100644 (file)
@@ -297,7 +297,9 @@ list(APPEND WebKit2_SOURCES
     WebProcess/soup/WebSoupRequestManager.cpp
 )
 
-set(WebKit2_INSTALLED_HEADERS
+set(WebKit2GTK_INSTALLED_HEADERS
+    ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
+    ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitVersion.h
     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitAuthenticationRequest.h
     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardList.h
     ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitBackForwardListItem.h
@@ -445,11 +447,11 @@ add_custom_command(
 add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
            ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
-    DEPENDS ${WebKit2_INSTALLED_HEADERS}
+    DEPENDS ${WebKit2GTK_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/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
+    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.h.template ${WebKit2GTK_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/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
+    COMMAND glib-mkenums --template ${WEBKIT2_DIR}/UIProcess/API/gtk/WebKitEnumTypes.cpp.template ${WebKit2GTK_INSTALLED_HEADERS} | sed s/web_kit/webkit/ > ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.cpp
     VERBATIM)
 
 add_custom_command(
@@ -596,18 +598,18 @@ if (ENABLE_PLUGIN_PROCESS)
     )
     GENERATE_WEBKIT2_MESSAGE_SOURCES(PluginProcess_SOURCES "${PluginProcess_MESSAGES_IN_FILES}")
 
-    add_executable(${PluginProcess_EXECUTABLE_NAME} ${PluginProcess_SOURCES})
+    add_executable(WebKitPluginProcess ${PluginProcess_SOURCES})
 
     # 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}
+        TARGET WebKitPluginProcess
         APPEND
         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
     )
     set_property(
-        TARGET ${PluginProcess_EXECUTABLE_NAME}
+        TARGET WebKitPluginProcess
         APPEND
         PROPERTY INCLUDE_DIRECTORIES
             ${WebKit2CommonIncludeDirectories}
@@ -615,15 +617,15 @@ if (ENABLE_PLUGIN_PROCESS)
             ${GDK2_INCLUDE_DIRS}
     )
 
-    target_link_libraries(${PluginProcess_EXECUTABLE_NAME}
+    target_link_libraries(WebKitPluginProcess
         ${SharedWebKit2Libraries}
         WebCorePlatformGTK2
         WebCore
     )
 
-    add_dependencies(${PluginProcess_EXECUTABLE_NAME} WebKit2)
+    add_dependencies(WebKitPluginProcess WebKit2)
 
-    install(TARGETS ${PluginProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
+    install(TARGETS WebKitPluginProcess DESTINATION "${LIBEXEC_INSTALL_DIR}")
 endif () # ENABLE_PLUGIN_PROCESS
 
 # Commands for building the built-in injected bundle.
@@ -680,8 +682,7 @@ add_custom_command(
         -I${DERIVED_SOURCES_DIR}
         -I${DERIVED_SOURCES_WEBKIT2GTK_DIR}
         -I${FORWARDING_HEADERS_WEBKIT2GTK_DIR}
-        ${DERIVED_SOURCES_WEBKIT2GTK_API_DIR}/WebKitEnumTypes.h
-        ${WebKit2_INSTALLED_HEADERS}
+        ${WebKit2GTK_INSTALLED_HEADERS}
         ${WEBKIT2_DIR}/UIProcess/API/gtk/*.cpp
 )
 
@@ -742,3 +743,22 @@ add_custom_command(
 
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib)
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib)
+
+install(TARGETS webkit2gtkinjectedbundle
+        DESTINATION "${LIB_INSTALL_DIR}/webkit2gtk-3.0/injected-bundle"
+)
+install(FILES "${CMAKE_BINARY_DIR}/Source/WebKit2/webkit2gtk-3.0.pc"
+        DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
+)
+install(FILES ${WebKit2GTK_INSTALLED_HEADERS}
+              ${WebKit2WebExtension_INSTALLED_HEADERS}
+        DESTINATION "${WEBKITGTK_HEADER_INSTALL_DIR}/webkit2"
+)
+install(FILES ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
+              ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir
+        DESTINATION ${INTROSPECTION_INSTALL_GIRDIR}
+)
+install(FILES ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
+              ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
+        DESTINATION ${INTROSPECTION_INSTALL_TYPELIBDIR}
+)
index 6d604c0..369526d 100644 (file)
@@ -42,7 +42,10 @@ if (UNIX AND NOT APPLE)
     set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
 endif ()
 
-set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
-
-set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})")
-set(EXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables")
+# GTK uses the GNU installation directories.
+if (NOT PORT STREQUAL "GTK")
+    set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
+    set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})")
+    set(EXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables")
+    set(LIBEXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables executed by the library")
+endif ()
index 59f6cea..4ca0f31 100644 (file)
@@ -117,18 +117,15 @@ set(WebKit2_OUTPUT_NAME webkit2gtk-3.0)
 set(WebKit2_WebProcess_OUTPUT_NAME WebKitWebProcess)
 
 set(DATA_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${WebKit_OUTPUT_NAME}")
-set(DATA_INSTALL_DIR "${DATADIR}/webkitgtk-3.0")
-
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
-endif ()
+set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/webkitgtk-3.0")
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Where to install libraries")
+set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH "Where to install executables")
+set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}" CACHE PATH "Where to install executables executed by the library")
+set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-3.0")
 
 add_definitions(-DBUILDING_GTK__=1)
 add_definitions(-DGETTEXT_PACKAGE="WebKitGTK-3.0")
-add_definitions(-DDATA_DIR="${DATADIR}")
+add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")
 add_definitions(-DWEBKITGTK_API_VERSION_STRING="3.0")
 add_definitions(-DUSER_AGENT_GTK_MAJOR_VERSION=537)
 add_definitions(-DUSER_AGENT_GTK_MINOR_VERSION=30)
@@ -145,6 +142,13 @@ endif ()
 add_definitions(-DWTF_PLATFORM_X11=1)
 add_definitions(-DMOZ_X11)
 
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> ruT <TARGET> <LINK_FLAGS> <OBJECTS>")
+endif ()
+
 find_package(Cairo 1.10.2 REQUIRED)
 find_package(Fontconfig 2.8.0 REQUIRED)
 find_package(Freetype 2.4.2 REQUIRED)
@@ -224,6 +228,7 @@ 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)
+set(SHOULD_INSTALL_JS_SHELL ON)
 
 # Add a typelib file to the list of all typelib dependencies. This makes it easy to
 # expose a 'gir' target with all gobject-introspection files.