aboutsummaryrefslogtreecommitdiffstats
path: root/extras/fluid.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-22 10:24:26 +0200
committerDavid Robillard <d@drobilla.net>2018-09-22 10:24:26 +0200
commitdb4fa08d4da3cc840e6f97e6869a877f2b4c9474 (patch)
tree956538ded0be74ac6588f4cc6a963900eb8159ff /extras/fluid.py
downloadlv2-db4fa08d4da3cc840e6f97e6869a877f2b4c9474.tar.xz
Squashed 'waflib/' content from commit 6e726eb
git-subtree-dir: waflib git-subtree-split: 6e726eb11d3e21be410549d27dd1aa94678f3d09
Diffstat (limited to 'extras/fluid.py')
-rw-r--r--extras/fluid.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/extras/fluid.py b/extras/fluid.py
new file mode 100644
index 0000000..4814a35
--- /dev/null
+++ b/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)
+