waf

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

fluid.py (862B)


      1 #!/usr/bin/python
      2 # encoding: utf-8
      3 # Grygoriy Fuchedzhy 2009
      4 
      5 """
      6 Compile fluid files (fltk graphic library). Use the 'fluid' feature in conjunction with the 'cxx' feature.
      7 """
      8 
      9 from waflib import Task
     10 from waflib.TaskGen import extension
     11 
     12 class fluid(Task.Task):
     13 	color   = 'BLUE'
     14 	ext_out = ['.h']
     15 	run_str = '${FLUID} -c -o ${TGT[0].abspath()} -h ${TGT[1].abspath()} ${SRC}'
     16 
     17 @extension('.fl')
     18 def process_fluid(self, node):
     19 	"""add the .fl to the source list; the cxx file generated will be compiled when possible"""
     20 	cpp = node.change_ext('.cpp')
     21 	hpp = node.change_ext('.hpp')
     22 	self.create_task('fluid', node, [cpp, hpp])
     23 
     24 	if 'cxx' in self.features:
     25 		self.source.append(cpp)
     26 
     27 def configure(conf):
     28 	conf.find_program('fluid', var='FLUID')
     29 	conf.check_cfg(path='fltk-config', package='', args='--cxxflags --ldflags', uselib_store='FLTK', mandatory=True)
     30