File tree Expand file tree Collapse file tree 4 files changed +22
-12
lines changed Expand file tree Collapse file tree 4 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ jobs:
4242 strategy :
4343 matrix :
4444 configureFlags :
45- - " -Dintrospection=false -Dglib=disabled "
46- - " -Dglib=disabled "
45+ - " "
46+ - " -Dglib=enabled -Dintrospection=enabled "
4747 - " -Dgegl=enabled"
4848 include :
49- - configureFlags : " -Dglib=enabled"
49+ - configureFlags : " -Dglib=enabled -Dintrospection=enabled "
5050 extraDeps : " libgirepository1.0-dev"
5151 - configureFlags : " -Dgegl=enabled"
5252 extraDeps : " libgegl-dev"
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ install_headers(
3030)
3131
3232
33- if get_option ( ' introspection ' )
33+ if use_introspection
3434 gnome = import (' gnome' )
3535
3636 libmypaint_gegl_gir = gnome.generate_gir(
Original file line number Diff line number Diff line change @@ -93,6 +93,20 @@ if use_gegl
9393endif
9494
9595introspection_required_version = ' 1.32.0'
96+ introspection_feature = get_option (
97+ ' introspection' ,
98+ ).require(
99+ use_glib,
100+ error_message : ' Generating GObject introspection requires building with GLib support' ,
101+ )
102+ # For g-ir-scanner and g-ir-compiler as used by the gnome module.
103+ gi = dependency (
104+ ' gobject-introspection-1.0' ,
105+ version : f' >=@introspection_required_version@' ,
106+ required : introspection_feature,
107+ native : true ,
108+ )
109+ use_introspection = gi.found()
96110
97111
98112# OpenMP
@@ -235,11 +249,7 @@ libmypaint = library(
235249 install : true ,
236250)
237251
238-
239- if get_option (' introspection' )
240- if not use_glib
241- error (' Generating GObject introspection requires building with GLib support' )
242- endif
252+ if use_introspection
243253 gnome = import (' gnome' )
244254
245255 libmypaint_gir = gnome.generate_gir(
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ option(
4444)
4545option (
4646 ' introspection' ,
47- type : ' boolean ' ,
48- value : true ,
49- description : ' Enable GObject Instrospection' ,
47+ type : ' feature ' ,
48+ value : ' auto ' ,
49+ description : ' Enable GObject Instrospection (requires glib feature) ' ,
5050)
You can’t perform that action at this time.
0 commit comments