project('tigersum', 'c', 'd', version: '0.1', meson_version: '>=0.49.2', default_options: [ 'buildtype=release', ], ) pvt_incl = include_directories('src') read_buff_size = (get_option('read_buff_size') / 64) * 64 if (read_buff_size < 64) read_buff_size = 64 endif conf = configuration_data() conf.set('PROJECT_NAME', meson.project_name()) conf.set('DEFAULT_TIGER_VERSION', get_option('default_tiger_version')) version_arr = meson.project_version().split('.') conf.set('TIGERSUM_MAJOR', version_arr[0]) conf.set('TIGERSUM_MINOR', version_arr[1]) conf.set('READ_BUFF_SIZE', read_buff_size) if get_option('reference_tiger') conf.set('BACKEND_NAME', 'tiger') conf.set('BACKEND_WEBSITE', 'http://www.cs.technion.ac.il/~biham/Reports/Tiger/') conf.set('BACKEND_AUTHOR', 'Ross Anderson and Eli Biham') tiger_src = files('lib/reference_tiger/sboxes.c', 'lib/reference_tiger/tiger.c') else conf.set('BACKEND_NAME', 'freetiger') conf.set('BACKEND_WEBSITE', 'http://klondike.es/freetiger/') conf.set('BACKEND_AUTHOR', 'klondike') tiger_src = files('lib/freetiger/C/tiger.c') endif project_config_file = configure_file( input: 'src/' + meson.project_name() + 'Config.d.in', output: meson.project_name() + 'Config.d', configuration: conf ) executable(meson.project_name(), 'src/main.d', 'src/sums.d', 'src/tiger.d', project_config_file, tiger_src, install: true, include_directories: pvt_incl, d_import_dirs: [include_directories('.')], )