From 5564a51a793c4483b72ef912cdfa59f84fe39733 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 25 Dec 2015 03:06:33 +0100 Subject: [PATCH] build/platform: make lib SigC++ available for GUI test code Explanation: sigC++ was already linked as transitive dependency from gtkmm, since it is used for the "signal-slot" system wihin GTK. But now we want to use sigC++ itself from our generic UI-Backbone, so we need to pick up the additional compiler and linker flags and use them when building the relevant parts of both the application and the test suite --- admin/scons/Platform.py | 3 +++ src/SConscript | 2 +- src/gui/model/tangible.hpp | 4 +++- tests/SConscript | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/admin/scons/Platform.py b/admin/scons/Platform.py index bdf562409..2d7a41a97 100644 --- a/admin/scons/Platform.py +++ b/admin/scons/Platform.py @@ -114,6 +114,9 @@ def configure(env): if not conf.CheckPkgConfig('glibmm-2.4', '2.39'): problems.append('Unable to configure the mm-bindings for Glib') + if not conf.CheckPkgConfig('sigc++-2.0', '2.2.10'): + problems.append('Need the signal-slot-binding library SigC++2') + if not conf.CheckPkgConfig('glib-2.0', '2.40'): problems.append('Need a suitable Glib version.') diff --git a/src/SConscript b/src/SConscript index f87c70727..b21a72d23 100644 --- a/src/SConscript +++ b/src/SConscript @@ -37,7 +37,7 @@ plugins = [] # currently none # the Lumiera GTK GUI envGtk = env.Clone() -envGtk.mergeConf(['gtkmm-3.0','gthread-2.0','cairomm-1.0','gdl','xv','x11','xext','sm']) +envGtk.mergeConf(['gtkmm-3.0','sigc++-2.0','gthread-2.0','cairomm-1.0','gdl','xv','x11','xext','sm']) envGtk.Append(LIBS=core) guimodule = envGtk.LumieraPlugin('gtk_gui', srcSubtree('gui'), install=True) diff --git a/src/gui/model/tangible.hpp b/src/gui/model/tangible.hpp index e343d2c0a..24935783d 100644 --- a/src/gui/model/tangible.hpp +++ b/src/gui/model/tangible.hpp @@ -44,6 +44,7 @@ //#include "lib/util.hpp" #include +#include #include @@ -65,7 +66,8 @@ namespace model { * @todo write type comment... */ class Tangible - : boost::noncopyable + : public sigc::trackable + , boost::noncopyable { protected: using GenNode = lib::diff::GenNode; diff --git a/tests/SConscript b/tests/SConscript index bcc471ab0..c1d249ad3 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -48,6 +48,9 @@ def testCases(env,dir): """ env = env.Clone() env.Append(CPPPATH=dir) # add subdir to Includepath + if dir.startswith('gui'): + # additional libs used from gui tests + env.mergeConf(['sigc++-2.0']) # pick up all test classes and link them shared testlib = []