summaryrefslogtreecommitdiffstats
path: root/waflib/extras/fluid.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-15 18:29:55 +0200
committerDavid Robillard <d@drobilla.net>2018-09-15 18:29:55 +0200
commit812c56d4b5167ba90c0ad8f4eb8ce1774efc5cbd (patch)
tree2a8fe0f824cd8f9d9929e69b3717ac332a54cd09 /waflib/extras/fluid.py
parentdc3db773eef6e735e240dfe1a5349fbce3eff6e9 (diff)
parent394c6862c3d82833fa87eb9689c3bc99d978b93b (diff)
downloadganv-812c56d4b5167ba90c0ad8f4eb8ce1774efc5cbd.tar.gz
ganv-812c56d4b5167ba90c0ad8f4eb8ce1774efc5cbd.tar.bz2
ganv-812c56d4b5167ba90c0ad8f4eb8ce1774efc5cbd.zip
Merge commit '394c6862c3d82833fa87eb9689c3bc99d978b93b' as 'waflib'
Diffstat (limited to 'waflib/extras/fluid.py')
-rw-r--r--waflib/extras/fluid.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/waflib/extras/fluid.py b/waflib/extras/fluid.py
new file mode 100644
index 0000000..4814a35
--- /dev/null
+++ b/waflib/extras/fluid.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+# encoding: utf-8
+# Grygoriy Fuchedzhy 2009
+
+"""
+Compile fluid files (fltk graphic library). Use the 'fluid' feature in conjunction with the 'cxx' feature.
+"""
+
+from waflib import Task
+from waflib.TaskGen import extension
+
+class fluid(Task.Task):
+ color = 'BLUE'
+ ext_out = ['.h']
+ run_str = '${FLUID} -c -o ${TGT[0].abspath()} -h ${TGT[1].abspath()} ${SRC}'
+
+@extension('.fl')
+def process_fluid(self, node):
+ """add the .fl to the source list; the cxx file generated will be compiled when possible"""
+ cpp = node.change_ext('.cpp')
+ hpp = node.change_ext('.hpp')
+ self.create_task('fluid', node, [cpp, hpp])
+
+ if 'cxx' in self.features:
+ self.source.append(cpp)
+
+def configure(conf):
+ conf.find_program('fluid', var='FLUID')
+ conf.check_cfg(path='fltk-config', package='', args='--cxxflags --ldflags', uselib_store='FLTK', mandatory=True)
+