summaryrefslogtreecommitdiff
path: root/third_party/waf/waflib/extras/fluid.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2018-01-31 11:48:43 +0200
committerAndrew Bartlett <abartlet@samba.org>2018-09-05 06:37:22 +0200
commit4e65b33c1d40bb2c243f775f388056aed31d8671 (patch)
tree5a41b6ddef7ce1c0b6a93bcc16ef89da10f080e8 /third_party/waf/waflib/extras/fluid.py
parentfaef27506977db01cc4619140a71652463914378 (diff)
downloadsamba-4e65b33c1d40bb2c243f775f388056aed31d8671.tar.gz
third_party:waf: update to upstream 2.0.4 release
Update third_party/waf/ to 2.0.4 to bring us closer to Python 3 This change requires a number of changes in buildtools/ too. Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party/waf/waflib/extras/fluid.py')
-rw-r--r--third_party/waf/waflib/extras/fluid.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/third_party/waf/waflib/extras/fluid.py b/third_party/waf/waflib/extras/fluid.py
new file mode 100644
index 00000000000..caa8afdfbc0
--- /dev/null
+++ b/third_party/waf/waflib/extras/fluid.py
@@ -0,0 +1,34 @@
+#! /usr/bin/env python
+# encoding: utf-8
+# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
+
+#!/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)
+