wscript 726 B

1234567891011121314151617181920212223242526272829303132
  1. #! /usr/bin/env python
  2. def configure(conf):
  3. try:
  4. conf.check_cfg(package='gtk+-3.0', uselib_store='GTK3', args='--cflags --libs')
  5. conf.load('glib2')
  6. except conf.errors.ConfigurationError:
  7. pass
  8. else:
  9. conf.env.build_gtk3 = True
  10. def build(bld):
  11. if not bld.env.build_gtk3:
  12. return
  13. bld (
  14. features = 'c glib2',
  15. use = 'GLIB GIO GOBJECT',
  16. source = 'test.gresource.xml',
  17. target = 'foo'
  18. )
  19. bld (
  20. features = 'c cprogram glib2',
  21. use = 'GTK3 foo',
  22. packages = 'gtk+-3.0',
  23. source = 'test.vala',
  24. vala_resources = 'test.gresource.xml', # adds --gresources /path/to/test.gresources.xml
  25. target = 'compositewidget',
  26. vala_target_glib = '2.38'
  27. )