[geary/wip/720315-webkitgtk-2.4] Generate WebKitGTK VAPI and use rather than .gir



commit 3e326c0210ba146bcfa01dffb4c23fbdd9606b4e
Author: Jim Nelson <jim yorba org>
Date:   Mon Dec 16 17:24:33 2013 -0800

    Generate WebKitGTK VAPI and use rather than .gir

 CMakeLists.txt     |    8 ++++----
 src/CMakeLists.txt |   16 +++++++++++++++-
 2 files changed, 19 insertions(+), 5 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a82dff2..7b4f4e1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,10 +55,10 @@ pkg_check_modules(LIBMESSAGINGMENU QUIET messaging-menu>=12.10.2)
 
 # CMake's range-checking syntax doesn't allow for a bare less-than, so using
 # improbably high version numbers to indicate maximum
-pkg_check_modules(WEBKITGTK24X webkitgtk-3.0>=2.3.0)
-pkg_check_modules(WEBKITGTK22X webkitgtk-3.0>=2.2.0 webkitgtk-3.0<=2.2.100)
-pkg_check_modules(WEBKITGTK20X webkitgtk-3.0>=2.0.0 webkitgtk-3.0<=2.0.100)
-pkg_check_modules(WEBKITGTK110X webkitgtk-3.0>=1.10.0 webkitgtk-3.0<=1.10.2)
+pkg_check_modules(WEBKITGTK24X QUIET webkitgtk-3.0>=2.3.0)
+pkg_check_modules(WEBKITGTK22X QUIET webkitgtk-3.0>=2.2.0 webkitgtk-3.0<=2.2.100)
+pkg_check_modules(WEBKITGTK20X QUIET webkitgtk-3.0>=2.0.0 webkitgtk-3.0<=2.0.100)
+pkg_check_modules(WEBKITGTK110X QUIET webkitgtk-3.0>=1.10.0 webkitgtk-3.0<=1.10.2)
 
 # intl
 include(Gettext)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 776df7a..4e0c113 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -517,8 +517,10 @@ set(ENGINE_PACKAGES
     glib-2.0 gee-0.8 gio-2.0 gmime-2.6 posix sqlite3 libxml-2.0
 )
 
+# webkitgtk-3.0 is listed as a custom VAPI (below) to ensure it's treated as a dependency and
+# built before compilation
 set(CLIENT_PACKAGES
-    gtk+-3.0 libsecret-1 WebKit-3.0 libnotify libcanberra ${EXTRA_CLIENT_PACKAGES}
+    gtk+-3.0 libsecret-1 libsoup-2.4 libnotify libcanberra ${EXTRA_CLIENT_PACKAGES}
 )
 
 set(CONSOLE_PACKAGES
@@ -592,6 +594,17 @@ OPTIONS
 add_library(geary-static STATIC ${ENGINE_VALA_C})
 target_link_libraries(geary-static ${DEPS_LIBRARIES} sqlite3-unicodesn gthread-2.0)
 
+# WebKitGTK VAPI generation
+#################################################
+add_custom_command(
+    OUTPUT
+        ${CMAKE_BINARY_DIR}/src/webkitgtk-3.0.vapi
+    WORKING_DIRECTORY
+        ${CMAKE_SOURCE_DIR}/bindings/metadata
+    COMMAND
+        vapigen --pkg=gio-2.0 --pkg=gtk+-3.0 --pkg=libsoup-2.4 --metadatadir=. 
--metadatadir=${WEBKITGTK_METADATA_DIR} --library=webkitgtk-3.0 --directory=${CMAKE_BINARY_DIR}/src 
`pkg-config --variable=girdir gobject-introspection-1.0`/WebKit-3.0.gir
+)
+
 # Geary client app
 #################################################
 vala_precompile(GEARY_VALA_C geary
@@ -601,6 +614,7 @@ PACKAGES
     ${ENGINE_PACKAGES}
 CUSTOM_VAPIS
     "${CMAKE_BINARY_DIR}/src/geary-static.vapi"
+    "${CMAKE_BINARY_DIR}/src/webkitgtk-3.0.vapi"
 OPTIONS
     ${VALAC_OPTIONS}
     --vapidir=${CMAKE_BINARY_DIR}/src


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]