waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (726B)


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