meson.build 942 B

1234567891011121314151617181920212223242526272829
  1. project('multiple outputs install', 'c')
  2. gen = find_program('generator.py')
  3. custom_target('different-install-dirs',
  4. output : ['diff.h', 'diff.sh'],
  5. command : [gen, 'diff', '@OUTDIR@'],
  6. install : true,
  7. install_dir : [join_paths(get_option('prefix'), get_option('includedir')),
  8. join_paths(get_option('prefix'), get_option('bindir'))])
  9. custom_target('same-install-dir',
  10. output : ['same.h', 'same.sh'],
  11. command : [gen, 'same', '@OUTDIR@'],
  12. install : true,
  13. install_dir : '/opt')
  14. custom_target('only-install-first',
  15. output : ['first.h', 'first.sh'],
  16. command : [gen, 'first', '@OUTDIR@'],
  17. install : true,
  18. install_dir : [join_paths(get_option('prefix'), get_option('includedir')), false])
  19. custom_target('only-install-second',
  20. output : ['second.h', 'second.sh'],
  21. command : [gen, 'second', '@OUTDIR@'],
  22. install : true,
  23. install_dir : [false, join_paths(get_option('prefix'), get_option('bindir'))])