Add an option for building examples
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 27 Mar 2018 12:15:21 +0000 (13:15 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 29 Mar 2018 10:37:30 +0000 (11:37 +0100)
Examples are not like demos; the latter are installed, and provide a
Flatpak manifest for CI pipelines and GNOME Builder. We should not be
using a single configure time option to gate building both.

meson.build
meson_options.txt

index b5c4fa166e57ff372e84316bbf92e848a019533b..9500d85d869c752a571146eb1e7e5798e4986820 100644 (file)
@@ -621,14 +621,16 @@ subdir('gdk')
 subdir('gsk')
 subdir('gtk')
 subdir('modules')
-if get_option('demos')
-  subdir('demos')
-  subdir('examples')
-endif
 if get_option('build-tests')
   subdir('tests')
   subdir('testsuite')
 endif
+if get_option('demos')
+  subdir('demos')
+endif
+if get_option('build-examples')
+  subdir('examples')
+endif
 
 # config.h
 configure_file(input: 'config.h.meson',
index 1d9752f7ab75326ae66bebfa4c0e05a109ef559e..6e795b08835711a146b829b094d510a6152b5d0a 100644 (file)
@@ -38,7 +38,9 @@ option('introspection', type: 'boolean', value: 'true',
 
 # Demos and binaries
 option('demos', type: 'boolean', value: 'true',
-  description : 'Build demos and example programs')
+  description : 'Build demo programs')
+option('build-examples', type: 'boolean', value: 'true',
+  description : 'Build examples')
 option('build-tests', type: 'boolean', value: 'true',
   description : 'Build tests')
 option('install-tests', type: 'boolean', value: 'false',