if not meson.is_cross_build()
+ if not have_tools
+ error('Need to build tools (orcc) to build examples.')
+ endif
+
examples = ['example1', 'example2', 'example3', 'mt19937ar']
foreach ex : examples
subdir('orc')
subdir('orc-test')
-subdir('tools')
-subdir('examples')
+
+have_tools = not get_option('tools').disabled()
+if have_tools
+ subdir('tools')
+else
+ orcc = disabler() # for testsuite/orcc/
+endif
+
+if not get_option('examples').disabled()
+ subdir('examples')
+endif
if not get_option('tests').disabled()
subdir('testsuite')
option('enable-backend', type : 'combo', choices : ['sse', 'mmx', 'neon', 'mips', 'altivec', 'c64x', 'all'], value : 'all')
+
+# Common feature options
+option('benchmarks', type : 'feature', value : 'auto', yield : true)
+option('examples', type : 'feature', value : 'auto', yield : true)
option('gtk_doc', type : 'feature', value : 'auto', yield : true, description : 'Generate API documentation with gtk-doc')
option('tests', type : 'feature', value : 'auto', yield : true)
+option('tools', type : 'feature', value : 'auto', yield : true)