meson.build 441 B

123456789101112131415161718
  1. project('custom target', 'c')
  2. python = find_program('python3')
  3. # Note that this will not add a dependency to the compiler executable.
  4. # Code will not be rebuilt if it changes.
  5. comp = '@0@/@1@'.format(meson.current_source_dir(), 'my_compiler.py')
  6. mytarget = custom_target('bindat',
  7. output : 'data.dat',
  8. input : 'data_source.txt',
  9. command : [python, comp, '@INPUT@', '@OUTPUT@'],
  10. install : true,
  11. install_dir : 'subdir'
  12. )
  13. subdir('depfile')