meson.build 508 B

12345678910111213141516171819
  1. subdir('subdir')
  2. python3 = import('python3').find_python()
  3. fake_generator_script = '''
  4. import os, sys
  5. assert os.path.exists(sys.argv[1]), "File %s not found" % sys.argv[1]
  6. print("This is a generated resource.")
  7. '''
  8. # Generate file res3.txt from file res3.txt.in. This is then included
  9. # in a GResource file, driven by resources/meson.build.
  10. res3_txt = custom_target('res3.txt',
  11. input: 'res3.txt.in',
  12. output: 'res3.txt',
  13. command: [python3, '-c', fake_generator_script, '@INPUT@'],
  14. capture: true,
  15. )