[libgit2-glib] meson: Simplified introspection option check



commit 966bd0bde699cfcb1546f40186be4dc064085be5
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Jan 19 11:13:53 2018 +0100

    meson: Simplified introspection option check
    
    The build of the introspection data depends on the existence of the
    GObject library, the `g-ir-scanner` program, and the build not being
    a cross build.
    
    The check to the GObject library has been removed, because it is
    required for compiling libgit2. The gir variable has also been
    removed because there is no need to store the intermediate state.
    
    Finally, the `build_gir` variable has been renamed to remain
    consistent with other similar variables like `enable_ssh`.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792699

 libgit2-glib/meson.build |    2 +-
 meson.build              |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/libgit2-glib/meson.build b/libgit2-glib/meson.build
index 8ee3013..6a09bd2 100644
--- a/libgit2-glib/meson.build
+++ b/libgit2-glib/meson.build
@@ -207,7 +207,7 @@ libgit2_glib_dep = declare_dependency(link_with: libgit2_glib,
                                       # Everything that uses libgit2-glib needs this built to compile
                                       sources: enum_types[1])
 
-if build_gir
+if enable_gir
   gir_extra_args = [
     '--identifier-prefix=Ggit',
     '--c-include=ggit.h'
diff --git a/meson.build b/meson.build
index 491bad1..9288562 100644
--- a/meson.build
+++ b/meson.build
@@ -131,15 +131,13 @@ glib_req = '2.44.0'
 glib = dependency('glib-2.0', version: '>=' + glib_req)
 gobject = dependency('gobject-2.0', version: '>=' + glib_req)
 gio = dependency('gio-2.0', version: '>=' + glib_req)
-build_gobject = gobject.found()
 
 libgit2 = dependency('libgit2', version: '>=' + git2_req)
 
-build_gir = build_gobject
-if get_option('introspection')
+enable_gir = get_option('introspection')
+if enable_gir
   # XXX: Not nice, but probably our best option
-  gir = find_program('g-ir-scanner', required: false)
-  build_gir = gir.found() and not meson.is_cross_build()
+  enable_gir = find_program('g-ir-scanner', required: false).found() and not meson.is_cross_build()
 endif
 
 ggit_h_data = configuration_data()


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