[GTK] CMake tries to install JavaScriptCore-3.0.gir outside of install prefix
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jul 2014 16:18:17 +0000 (16:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Jul 2014 16:18:17 +0000 (16:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135288

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-07-25
Reviewed by Martin Robinson.

* Source/cmake/FindGObjectIntrospection.cmake: pass correct libdir and
datadir to pkgconfig
* Source/cmake/OptionsGTK.cmake: define install directories early
enough to be used in FindGObjectIntrospection.cmake

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

ChangeLog
Source/cmake/FindGObjectIntrospection.cmake
Source/cmake/OptionsGTK.cmake

index 18825c9..d126143 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-07-25  Michael Catanzaro  <mcatanzaro@igalia.com>
+
+        [GTK] CMake tries to install JavaScriptCore-3.0.gir outside of install prefix
+        https://bugs.webkit.org/show_bug.cgi?id=135288
+
+        Reviewed by Martin Robinson.
+
+        * Source/cmake/FindGObjectIntrospection.cmake: pass correct libdir and
+        datadir to pkgconfig
+        * Source/cmake/OptionsGTK.cmake: define install directories early
+        enough to be used in FindGObjectIntrospection.cmake
+
 2014-07-23  Bem Jones-Bey  <bjonesbe@adobe.com>
 
         Remove CSS_EXCLUSIONS compile flag and leftover code
index 08ec7b3..0fb85f0 100644 (file)
@@ -11,6 +11,7 @@
 #  INTROSPECTION_LIBS
 #
 # Copyright (C) 2010, Pino Toscano, <pino@kde.org>
+# Copyright (C) 2014 Igalia S.L.
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 
@@ -43,8 +44,8 @@ if (PKG_CONFIG_FOUND)
         _gir_get_pkgconfig_var(INTROSPECTION_GENERATE "g_ir_generate" "")
         _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir" "")
         _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir" "")
-        _gir_get_pkgconfig_var(INTROSPECTION_INSTALL_GIRDIR "girdir" "--define-variable=prefix=${CMAKE_INSTALL_PREFIX}")
-        _gir_get_pkgconfig_var(INTROSPECTION_INSTALL_TYPELIBDIR "typelibdir" "--define-variable=prefix=${CMAKE_INSTALL_PREFIX}")
+        _gir_get_pkgconfig_var(INTROSPECTION_INSTALL_GIRDIR "girdir" "--define-variable=datadir=${DATA_INSTALL_DIR}")
+        _gir_get_pkgconfig_var(INTROSPECTION_INSTALL_TYPELIBDIR "typelibdir" "--define-variable=libdir=${LIB_INSTALL_DIR}")
         set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
         set(INTROSPECTION_LIBS "${_pc_gir_LIBS}")
     endif ()
index 2f7fa2d..190aae6 100644 (file)
@@ -16,6 +16,16 @@ set(ENABLE_GTKDOC OFF CACHE BOOL "Whether or not to use generate gtkdoc.")
 set(ENABLE_X11_TARGET ON CACHE BOOL "Whether to enable support for the X11 windowing target.")
 set(ENABLE_WAYLAND_TARGET OFF CACHE BOOL "Whether to enable support for the Wayland windowing target.")
 
+# These are shared variables, but we special case their definition so that we can use the
+# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
+set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory")
+set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}" CACHE PATH "Absolute path to install executables executed by the library")
+
+set(DATA_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${WebKit_OUTPUT_NAME}")
+set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
+set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
+
 find_package(Cairo 1.10.2 REQUIRED)
 find_package(Fontconfig 2.8.0 REQUIRED)
 find_package(Freetype2 2.4.2 REQUIRED)
@@ -173,16 +183,6 @@ set(WebKit2_WebProcess_OUTPUT_NAME WebKitWebProcess)
 set(WebKit2_NetworkProcess_OUTPUT_NAME WebKitNetworkProcess)
 set(WebKit2_PluginProcess_OUTPUT_NAME WebKitPluginProcess)
 
-# These are shared variables, but we special case their definition so that we can use the
-# CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro.
-set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to library installation directory")
-set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory")
-set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}" CACHE PATH "Absolute path to install executables executed by the library")
-
-set(DATA_BUILD_DIR "${CMAKE_BINARY_DIR}/share/${WebKit_OUTPUT_NAME}")
-set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
-set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKITGTK_API_VERSION}")
-
 add_definitions(-DBUILDING_GTK__=1)
 add_definitions(-DGETTEXT_PACKAGE="WebKit2GTK-${WEBKITGTK_API_VERSION}")
 add_definitions(-DDATA_DIR="${CMAKE_INSTALL_DATADIR}")