summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-16 12:21:47 +0200
committerDavid Robillard <d@drobilla.net>2018-09-16 13:05:04 +0200
commit0f916d226847cf034693ea1c0427929c4fa0e46e (patch)
tree2f435c84c605ac846965e59e50b16b4c13eed4da
parent955aa3f4bfdcc20d13373500c08748041498da5a (diff)
downloadganv-0f916d226847cf034693ea1c0427929c4fa0e46e.tar.gz
ganv-0f916d226847cf034693ea1c0427929c4fa0e46e.tar.bz2
ganv-0f916d226847cf034693ea1c0427929c4fa0e46e.zip
Clean up wscript
-rw-r--r--wscript43
1 files changed, 19 insertions, 24 deletions
diff --git a/wscript b/wscript
index 13793b5..da4fdbd 100644
--- a/wscript
+++ b/wscript
@@ -1,8 +1,9 @@
#!/usr/bin/env python
+
import os
-import waflib.Options as Options
-import waflib.Utils as Utils
-import waflib.extras.autowaf as autowaf
+
+from waflib import Options, Utils
+from waflib.extras import autowaf
# Library and package version (UNIX style major, minor, micro)
# major increment <=> incompatible changes
@@ -22,16 +23,13 @@ def options(ctx):
ctx.load('compiler_cxx')
autowaf.set_options(ctx, test=True)
opt = ctx.get_option_group('Configuration options')
- opt.add_option('--no-graphviz', action='store_true', dest='no_graphviz',
- help='do not compile with graphviz support')
- opt.add_option('--light-theme', action='store_true', dest='light_theme',
- help='use light coloured theme')
- opt.add_option('--no-fdgl', action='store_true', dest='no_fdgl',
- help='use experimental force-directed graph layout')
- opt.add_option('--no-nls', action='store_true', dest='no_nls',
- help='disable i18n (native language support)')
- opt.add_option('--gir', action='store_true', dest='gir',
- help='build GObject introspection data')
+ autowaf.add_flags(
+ opt,
+ {'no-graphviz': 'do not compile with graphviz support',
+ 'light-theme': 'use light coloured theme',
+ 'no-fdgl': 'use experimental force-directed graph layout',
+ 'no-nls': 'disable i18n (native language support)',
+ 'gir': 'build GObject introspection data'})
def configure(conf):
autowaf.display_header('Ganv Configuration')
@@ -68,19 +66,16 @@ def configure(conf):
define_name = 'ENABLE_NLS',
mandatory = False)
- conf.env.LIB_GANV = ['ganv-%s' % GANV_MAJOR_VERSION]
-
+ autowaf.set_lib_env(conf, 'ganv', GANV_VERSION)
conf.write_config_header('ganv_config.h', remove=False)
- autowaf.display_summary(conf)
- autowaf.display_msg(conf, "Static (Graphviz) arrange",
- bool(conf.env.HAVE_AGRAPH))
- autowaf.display_msg(conf, "Interactive force-directed arrange",
- bool(conf.env.GANV_FDGL))
- autowaf.display_msg(conf, "Native language support", bool(conf.env.ENABLE_NLS))
- autowaf.display_msg(conf, "GObject introspection", bool(conf.env.HAVE_GIR))
- autowaf.display_msg(conf, "Unit tests", bool(conf.env.BUILD_TESTS))
- print('')
+ autowaf.display_summary(
+ conf,
+ {'Static (Graphviz) arrange': bool(conf.env.HAVE_AGRAPH_2_20),
+ 'Interactive force-directed arrange': bool(conf.env.GANV_FDGL),
+ 'Native language support': bool(conf.env.ENABLE_NLS),
+ 'GObject introspection': bool(conf.env.HAVE_GIR),
+ 'Unit tests': bool(conf.env.BUILD_TESTS)})
ganv_source = [
'src/Canvas.cpp',