Title: [161311] trunk
Revision
161311
Author
[email protected]
Date
2014-01-04 09:46:06 -0800 (Sat, 04 Jan 2014)

Log Message

[GTK] [CMake] Improve the way we locate gobject-introspection
https://bugs.webkit.org/show_bug.cgi?id=126452

Reviewed by Philippe Normand.

.:

* Source/cmake/FindGObjectIntrospection.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Load the new  FindGObjectIntrospection file.

Source/_javascript_Core:

* PlatformGTK.cmake: Use the new introspection variables.

Source/WebKit:

* PlatformGTK.cmake: Use the new introspection variables.

Source/WebKit2:

* PlatformGTK.cmake: Use the new introspection variables.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (161310 => 161311)


--- trunk/ChangeLog	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/ChangeLog	2014-01-04 17:46:06 UTC (rev 161311)
@@ -1,5 +1,15 @@
 2014-01-04  Martin Robinson  <[email protected]>
 
+        [GTK] [CMake] Improve the way we locate gobject-introspection
+        https://bugs.webkit.org/show_bug.cgi?id=126452
+
+        Reviewed by Philippe Normand.
+
+        * Source/cmake/FindGObjectIntrospection.cmake: Added.
+        * Source/cmake/OptionsGTK.cmake: Load the new  FindGObjectIntrospection file.
+
+2014-01-04  Martin Robinson  <[email protected]>
+
         [GTK] [CMake] Fix the video and audio build
         https://bugs.webkit.org/show_bug.cgi?id=126464
 

Modified: trunk/Source/_javascript_Core/ChangeLog (161310 => 161311)


--- trunk/Source/_javascript_Core/ChangeLog	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-01-04 17:46:06 UTC (rev 161311)
@@ -1,3 +1,12 @@
+2014-01-04  Martin Robinson  <[email protected]>
+
+        [GTK] [CMake] Improve the way we locate gobject-introspection
+        https://bugs.webkit.org/show_bug.cgi?id=126452
+
+        Reviewed by Philippe Normand.
+
+        * PlatformGTK.cmake: Use the new introspection variables.
+
 2014-01-04  Zan Dobersek  <[email protected]>
 
         Explicitly use the std:: nested name specifier when using std::pair, std::make_pair

Modified: trunk/Source/_javascript_Core/PlatformGTK.cmake (161310 => 161311)


--- trunk/Source/_javascript_Core/PlatformGTK.cmake	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/_javascript_Core/PlatformGTK.cmake	2014-01-04 17:46:06 UTC (rev 161311)
@@ -4,7 +4,7 @@
 add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/_javascript_Core-3.0.typelib
     DEPENDS ${CMAKE_BINARY_DIR}/_javascript_Core-3.0.gir
-    COMMAND g-ir-compiler ${CMAKE_BINARY_DIR}/_javascript_Core-3.0.gir -o ${CMAKE_BINARY_DIR}/_javascript_Core-3.0.typelib
+    COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/_javascript_Core-3.0.gir -o ${CMAKE_BINARY_DIR}/_javascript_Core-3.0.typelib
 )
 
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/_javascript_Core-3.0.typelib)

Modified: trunk/Source/WebKit/ChangeLog (161310 => 161311)


--- trunk/Source/WebKit/ChangeLog	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/WebKit/ChangeLog	2014-01-04 17:46:06 UTC (rev 161311)
@@ -1,3 +1,12 @@
+2014-01-04  Martin Robinson  <[email protected]>
+
+        [GTK] [CMake] Improve the way we locate gobject-introspection
+        https://bugs.webkit.org/show_bug.cgi?id=126452
+
+        Reviewed by Philippe Normand.
+
+        * PlatformGTK.cmake: Use the new introspection variables.
+
 2014-01-03  Simon Fraser  <[email protected]>
 
         Attempt to fix EFL build.

Modified: trunk/Source/WebKit/PlatformGTK.cmake (161310 => 161311)


--- trunk/Source/WebKit/PlatformGTK.cmake	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/WebKit/PlatformGTK.cmake	2014-01-04 17:46:06 UTC (rev 161311)
@@ -165,7 +165,7 @@
     DEPENDS WebKit
     DEPENDS _javascript_Core-3-gir
     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
-        g-ir-scanner
+        ${INTROSPECTION_SCANNER}
         --quiet
         --warn-all
         --symbol-prefix=webkit
@@ -202,7 +202,7 @@
 add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
     DEPENDS ${CMAKE_BINARY_DIR}/WebKit-3.0.gir
-    COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
+    COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
 )
 
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit-3.0.typelib)

Modified: trunk/Source/WebKit2/ChangeLog (161310 => 161311)


--- trunk/Source/WebKit2/ChangeLog	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-04 17:46:06 UTC (rev 161311)
@@ -1,3 +1,12 @@
+2014-01-04  Martin Robinson  <[email protected]>
+
+        [GTK] [CMake] Improve the way we locate gobject-introspection
+        https://bugs.webkit.org/show_bug.cgi?id=126452
+
+        Reviewed by Philippe Normand.
+
+        * PlatformGTK.cmake: Use the new introspection variables.
+
 2014-01-04  Zan Dobersek  <[email protected]>
 
         Explicitly use the std:: nested name specifier when using std::pair, std::make_pair

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (161310 => 161311)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2014-01-04 17:46:06 UTC (rev 161311)
@@ -651,7 +651,7 @@
     DEPENDS WebKit2
     DEPENDS _javascript_Core-3-gir
     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
-        g-ir-scanner
+        ${INTROSPECTION_SCANNER}
         --quiet
         --warn-all
         --symbol-prefix=webkit
@@ -690,7 +690,7 @@
     DEPENDS _javascript_Core-3-gir
     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
-        g-ir-scanner
+        ${INTROSPECTION_SCANNER}
         --quiet
         --warn-all
         --symbol-prefix=webkit
@@ -731,13 +731,13 @@
 add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
-    COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
+    COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
 )
 
 add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir
-    COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
+    COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
 )
 
 ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib)

Added: trunk/Source/cmake/FindGObjectIntrospection.cmake (0 => 161311)


--- trunk/Source/cmake/FindGObjectIntrospection.cmake	                        (rev 0)
+++ trunk/Source/cmake/FindGObjectIntrospection.cmake	2014-01-04 17:46:06 UTC (rev 161311)
@@ -0,0 +1,63 @@
+# - Try to find gobject-introspection
+# Once done, this will define
+#
+#  INTROSPECTION_FOUND - system has gobject-introspection
+#  INTROSPECTION_SCANNER - the gobject-introspection scanner, g-ir-scanner
+#  INTROSPECTION_COMPILER - the gobject-introspection compiler, g-ir-compiler
+#  INTROSPECTION_GENERATE - the gobject-introspection generate, g-ir-generate
+#  INTROSPECTION_GIRDIR
+#  INTROSPECTION_TYPELIBDIR
+#  INTROSPECTION_CFLAGS
+#  INTROSPECTION_LIBS
+#
+# Copyright (C) 2010, Pino Toscano, <[email protected]>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname _extra_args)
+    execute_process(
+        COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} ${_extra_args} gobject-introspection-1.0
+        OUTPUT_VARIABLE _result
+        RESULT_VARIABLE _null
+    )
+
+    if (_null)
+    else ()
+        string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
+        string(REGEX REPLACE " +$" ""  _result "${_result}")
+        separate_arguments(_result)
+        set(${_outvar} ${_result} CACHE INTERNAL "")
+    endif ()
+endmacro(_GIR_GET_PKGCONFIG_VAR)
+
+find_package(PkgConfig)
+if (PKG_CONFIG_FOUND)
+    if (PACKAGE_FIND_VERSION_COUNT GREATER 0)
+        set(_gir_version_cmp ">=${PACKAGE_FIND_VERSION}")
+    endif ()
+    pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp})
+    if (_pc_gir_FOUND)
+        set(INTROSPECTION_FOUND TRUE)
+        _gir_get_pkgconfig_var(INTROSPECTION_SCANNER "g_ir_scanner" "")
+        _gir_get_pkgconfig_var(INTROSPECTION_COMPILER "g_ir_compiler" "")
+        _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}")
+        set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
+        set(INTROSPECTION_LIBS "${_pc_gir_LIBS}")
+    endif ()
+endif ()
+
+mark_as_advanced(
+    INTROSPECTION_SCANNER
+    INTROSPECTION_COMPILER
+    INTROSPECTION_GENERATE
+    INTROSPECTION_GIRDIR
+    INTROSPECTION_TYPELIBDIR
+    INTROSPECTION_CFLAGS
+    INTROSPECTION_LIBS
+    INTROSPECTION_INSTALL_GIRDIR
+    INTROSPECTION_INSTALL_TYPELIBDIR
+)

Modified: trunk/Source/cmake/OptionsGTK.cmake (161310 => 161311)


--- trunk/Source/cmake/OptionsGTK.cmake	2014-01-04 17:44:28 UTC (rev 161310)
+++ trunk/Source/cmake/OptionsGTK.cmake	2014-01-04 17:46:06 UTC (rev 161311)
@@ -168,6 +168,7 @@
 find_package(WebP REQUIRED)
 find_package(GStreamer 1.0.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
 find_package(ATSPI 2.5.3)
+find_package(GObjectIntrospection)
 
 # We don't use find_package for GLX because it is part of -lGL, unlike EGL.
 find_package(OpenGL)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to