Include waf as an extracted source directory, rather than as a one-in-a-file script.
[samba.git] / buildtools / wafadmin / 3rdparty / fluid.py
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 conjuction with the 'cxx' feature.
7 """
8
9 import Task
10 from TaskGen import extension
11
12 Task.simple_task_type('fluid', '${FLUID} -c -o ${TGT[0].abspath(env)} -h ${TGT[1].abspath(env)} ${SRC}', 'BLUE', shell=False, ext_out='.cxx')
13
14 @extension('.fl')
15 def fluid(self, node):
16         """add the .fl to the source list; the cxx file generated will be compiled when possible"""
17         cpp = node.change_ext('.cpp')
18         hpp = node.change_ext('.hpp')
19         self.create_task('fluid', node, [cpp, hpp])
20
21         if 'cxx' in self.features:
22                 self.allnodes.append(cpp)
23
24 def detect(conf):
25     fluid = conf.find_program('fluid', var='FLUID', mandatory=True)
26     conf.check_cfg(path='fltk-config', package='', args='--cxxflags --ldflags', uselib_store='FLTK', mandatory=True)
27