From ef91731a480b79c96e10b2b5256a36407bb5ef6e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 18 Dec 2013 00:31:20 +0000 Subject: Add experimental (slow) force-directed graph layout to Ganv. This continuously arranges the graph, and the user can drag around nodes to influence the layout which is handy. To try, configure with --no-graphviz --fdgl. Still rough around the edges, in particular detached nodes will fly off into space. Also entirely too slow for production use, will need a more sophisticated data structure for that, so the repel calculation isn't O(n^2). git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5177 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 0abb4a4..364c106 100644 --- a/wscript +++ b/wscript @@ -25,6 +25,8 @@ def options(opt): help='Build unit tests') opt.add_option('--no-graphviz', action='store_true', dest='no_graphviz', help='Do not compile with graphviz support') + opt.add_option('--fdgl', action='store_true', dest='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', @@ -54,6 +56,9 @@ def configure(conf): autowaf.check_pkg(conf, 'libgvc', uselib_store='AGRAPH', atleast_version='2.8', mandatory=False) + if Options.options.fdgl: + autowaf.define(conf, 'GANV_FDGL', 1) + if not Options.options.no_nls: autowaf.check_header(conf, 'c', 'libintl.h', 'ENABLE_NLS', mandatory=False) @@ -128,7 +133,7 @@ def build(bld): if bld.env.BUILD_TESTS: # Static library for test program - bld(features = 'c cstlib', + bld(features = 'c cstlib cxx cxxshlib', source = ganv_source, includes = ['.', './src'], name = 'libganv_profiled', @@ -138,7 +143,7 @@ def build(bld): cflags = [ '-fprofile-arcs', '-ftest-coverage' ]) # Test program (C) - bld(features = 'c cprogram', + bld(features = 'cxx cxxprogram', source = 'src/ganv_test.c', includes = ['.', './src'], use = 'libganv_profiled', -- cgit v1.2.1