[GTK] REGRESSION(r171598, CMake): Introspection files are installed at the wrong...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Aug 2014 13:10:37 +0000 (13:10 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Aug 2014 13:10:37 +0000 (13:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135934

Reviewed by Gustavo Noronha Silva.

Since r171598 gir files are installed under $datadir/webkitgtk-4.0/gir-1.0/.
The gir files should installed in $datadir/gir-1.0/ together with all other
gir files. We don't need to install introspection files in a versioned
directory because their filenames already contain the binary version. But before
r171598, the files were only installed to the right directory if the
gobject-instrospection pkg-config file was in the same prefix than the one we
wanted to install, because the gir and typelibs directories were extracted from
the pkg-config file. We should define INTROSPECTION_INSTALL_GIRDIR and
INTROSPECTION_INSTALL_TYPELIBDIR in OptionsGTK.cmake based on $datadir and $libdir
like we do in the autotools build.

* Source/cmake/FindGObjectIntrospection.cmake: Do not define
INTROSPECTION_INSTALL_GIRDIR and INTROSPECTION_INSTALL_TYPELIBDIR.
* Source/cmake/OptionsGTK.cmake: Define
INTROSPECTION_INSTALL_GIRDIR and INTROSPECTION_INSTALL_TYPELIBDIR.

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

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

index 6abc1bb..047d84b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
 2014-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        [GTK] REGRESSION(r171598, CMake): Introspection files are installed at the wrong path
+        https://bugs.webkit.org/show_bug.cgi?id=135934
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Since r171598 gir files are installed under $datadir/webkitgtk-4.0/gir-1.0/.
+        The gir files should installed in $datadir/gir-1.0/ together with all other
+        gir files. We don't need to install introspection files in a versioned
+        directory because their filenames already contain the binary version. But before
+        r171598, the files were only installed to the right directory if the
+        gobject-instrospection pkg-config file was in the same prefix than the one we
+        wanted to install, because the gir and typelibs directories were extracted from
+        the pkg-config file. We should define INTROSPECTION_INSTALL_GIRDIR and
+        INTROSPECTION_INSTALL_TYPELIBDIR in OptionsGTK.cmake based on $datadir and $libdir
+        like we do in the autotools build.
+
+        * Source/cmake/FindGObjectIntrospection.cmake: Do not define
+        INTROSPECTION_INSTALL_GIRDIR and INTROSPECTION_INSTALL_TYPELIBDIR.
+        * Source/cmake/OptionsGTK.cmake: Define
+        INTROSPECTION_INSTALL_GIRDIR and INTROSPECTION_INSTALL_TYPELIBDIR.
+
+2014-08-14  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         [GTK] WebKit DOM documentation (webkitdomgtk) not installed after make install
         https://bugs.webkit.org/show_bug.cgi?id=135836
 
index 0fb85f0..e1f49b4 100644 (file)
@@ -44,8 +44,6 @@ 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=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 ()
@@ -59,6 +57,4 @@ mark_as_advanced(
     INTROSPECTION_TYPELIBDIR
     INTROSPECTION_CFLAGS
     INTROSPECTION_LIBS
-    INTROSPECTION_INSTALL_GIRDIR
-    INTROSPECTION_INSTALL_TYPELIBDIR
 )
index 352d71c..a336e72 100644 (file)
@@ -25,6 +25,8 @@ set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/webkitgtk-${WEBKITGTK_
 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}")
+set(INTROSPECTION_INSTALL_GIRDIR "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0")
+set(INTROSPECTION_INSTALL_TYPELIBDIR "${LIB_INSTALL_DIR}/girepository-1.0")
 
 find_package(Cairo 1.10.2 REQUIRED)
 find_package(Fontconfig 2.8.0 REQUIRED)