project('gst-omx', 'c',
version : '1.15.1',
- meson_version : '>= 0.36.0',
+ meson_version : '>= 0.47',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
x11_dep = dependency('x11', required : false)
-if host_machine.system() != 'windows'
- gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
+gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
+ required : get_option('tests'),
fallback : ['gstreamer', 'gst_check_dep'])
-endif
libm = cc.find_library('m', required : false)
glib_dep = dependency('glib-2.0', version : glib_req)
configure_file(output : 'config.h', configuration : cdata)
subdir('config')
-subdir('examples')
+
+if not get_option('examples').disabled()
+ subdir('examples')
+endif
+
subdir('omx')
-subdir('tools')
-subdir('tests')
+
+if not get_option('tools').disabled()
+ subdir('tools')
+endif
+
+if not get_option('tests').disabled() and gstcheck_dep.found()
+ subdir('tests')
+endif
python3 = find_program('python3')
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
option('struct_packing', type : 'combo',
choices : ['0', '1', '2', '4', '8'], value : '0',
description : 'Force OpenMAX struct packing')
+
+# Common feature options
+option('examples', type : 'feature', value : 'auto', yield : true)
+option('tests', type : 'feature', value : 'auto', yield : true)
+option('tools', type : 'feature', value : 'auto', yield : true)