meson.build 656 B

1234567891011121314151617181920212223
  1. project('custom target', 'c')
  2. python = find_program('python3', required : false)
  3. if not python.found()
  4. python = find_program('python')
  5. endif
  6. # Note that this will not add a dependency to the compiler executable.
  7. # Code will not be rebuilt if it changes.
  8. comp = '@0@/@1@'.format(meson.current_source_dir(), 'my_compiler.py')
  9. # Test that files() in command: works. The compiler just discards it.
  10. useless = files('installed_files.txt')
  11. mytarget = custom_target('bindat',
  12. output : 'data.dat',
  13. input : 'data_source.txt',
  14. command : [python, comp, '--input=@INPUT@', '--output=@OUTPUT@', useless],
  15. install : true,
  16. install_dir : 'subdir'
  17. )
  18. subdir('depfile')