waf

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

wscript (1296B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 # Thomas Nagy, 2005, 2011 (ita)
      4 
      5 """
      6 Including the moc files *is* the best practice (KDE), not doing it is easy,
      7 but makes the compilations about 30-40% slower on average.
      8 
      9 If you still want the slow version (we warned you!), see the example located
     10 in the folder playground/slow_qt/
     11 """
     12 
     13 VERSION='0.0.1'
     14 APPNAME='qt4_test'
     15 
     16 top = '.'
     17 out = 'build'
     18 
     19 def options(opt):
     20 	opt.load('compiler_cxx qt4')
     21 
     22 def configure(conf):
     23 	conf.load('compiler_cxx qt4')
     24 	conf.env.append_value('CXXFLAGS', ['-g']) # test
     25 
     26 def build(bld):
     27 	bld(
     28 		features = 'qt4 cxx cxxprogram',
     29 		uselib   = 'QTCORE QTGUI QTOPENGL QTSVG',
     30 		source   = 'main.cpp textures.qrc but.ui foo.cpp',
     31 		target   = 'window',
     32 		includes = '.',
     33 		defines  = 'WAF=1', # test
     34 		lang     = bld.path.ant_glob('linguist/*.ts'),
     35 		langname = 'somefile', # include the .qm files from somefile.qrc
     36 	)
     37 
     38 # use the following if you want to add the include paths automatically
     39 """
     40 from waflib.TaskGen import feature, before, after
     41 @feature('cxx')
     42 @after('process_source')
     43 @before('apply_incpaths')
     44 def add_includes_paths(self):
     45     incs = set(self.to_list(getattr(self, 'includes', '')))
     46     for x in self.compiled_tasks:
     47         incs.add(x.inputs[0].parent.path_from(self.path))
     48     self.includes = list(incs)
     49 """