waf

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

wscript (1651B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2005, 2010 (ita)
      4 
      5 VERSION='0.0.1'
      6 APPNAME='glib2_test'
      7 
      8 top = '.'
      9 out = 'build'
     10 
     11 import os
     12 
     13 def options(opt):
     14 	opt.load ('compiler_c glib2')
     15 
     16 def configure(conf):
     17 	conf.load ('compiler_c glib2')
     18 
     19 	conf.check_cfg (package='glib-2.0', uselib_store='GLIB', atleast_version='2.25.0',
     20 	                args='--cflags --libs')
     21 	conf.check_cfg (package='gio-2.0', uselib_store='GIO', atleast_version='2.25.0',
     22 	                args='--cflags --libs')
     23 	conf.check_cfg (package='gobject-2.0', uselib_store='GOBJECT', atleast_version='2.25.0',
     24 	                args='--cflags --libs')
     25 
     26 
     27 def build(bld):
     28 	app = bld (
     29 		features = 'c cprogram glib2',
     30 		use      = 'GLIB GIO GOBJECT',
     31 		source   = 'main.c org.glib2.test.gresource.xml',
     32 		target   = 'gsettings-test'
     33 
     34 		## An alternate way of doing this (no need to call add_ functions):
     35 		# settings_enum_namespace = 'org.gsettings.test'
     36 		# settings_enum_files = ['enums.h']
     37 		# settings_schema_files = ['org.gsettings.test.gschema.xml']
     38 	)
     39 
     40 	app.add_settings_enums ('org.gsettings.test', 'enums.h')
     41 	app.add_settings_schemas (['org.gsettings.test.gschema.xml',
     42 	                           'org.gsettings.test-2.gschema.xml'])
     43 
     44 	app.add_marshal_file('marshal.list', 'test_marshal')
     45 
     46 	bld(
     47 		features = 'gresource',
     48 		source   = 'org.glib2.test.gresource.xml',
     49 		install_path = 'lib/glib2_test'
     50 	)
     51 
     52 	# Install a schema to a different location.
     53 	# It will be compiled to a cache file besides it.
     54 	bld(
     55 		features = 'glib2',
     56 		settings_schema_files = ['org.gsettings.simple.gschema.xml']
     57 	).env.GSETTINGSSCHEMADIR = os.path.join('etc', 'glib-2.0', 'schemas')