fix crash when copy'ing latent plugins
[ardour.git] / libs / canvas / wscript
index d4b9ad41770070e2600676cb4b5495ee2cd41f7e..b40f72412dbee5cbcc6779215ce62cc32314594e 100644 (file)
@@ -32,12 +32,15 @@ canvas_sources = [
         'arrow.cc',
         'canvas.cc',
         'circle.cc',
+        'colors.cc',
+        'colorspace.cc',
+        'container.cc',
         'curve.cc',
         'debug.cc',
         'item.cc',
         'fill.cc',
         'flag.cc',
-        'group.cc',
+        'framed_curve.cc',
         'image.cc',
         'line.cc',
         'line_set.cc',
@@ -49,10 +52,16 @@ canvas_sources = [
         'polygon.cc',
         'rectangle.cc',
         'root_group.cc',
+        'ruler.cc',
+        'scroll_group.cc',
+        'stateful_image.cc',
         'text.cc',
+        'tracking_text.cc',
         'types.cc',
         'utils.cc',
-        'wave_view.cc'
+        'wave_view.cc',
+        'widget.cc',
+        'xfade_curve.cc',
 ]
 
 def options(opt):
@@ -67,22 +76,49 @@ def build(bld):
     # Library
     if bld.is_defined ('INTERNAL_SHARED_LIBS'):
         obj = bld.shlib(features = 'cxx cxxshlib', source=canvas_sources)
+        obj.defines      = [ 'LIBCANVAS_DLL_EXPORTS=1' ]
     else:
         obj = bld.stlib(features = 'cxx cxxstlib', source=canvas_sources)
         obj.cxxflags     = [ '-fPIC' ]
         obj.cflags       = [ '-fPIC' ]
+        obj.defines      = [ ]
 
     obj.export_includes = ['.']
     obj.includes     = ['.']
-    obj.uselib       = 'SIGCPP CAIROMM GTKMM BOOST'
-    obj.use          = [ 'libpbd', 'libevoral', 'libardour', 'libgtkmm2ext' ]
+    obj.uselib       = 'SIGCPP CAIROMM GTKMM BOOST XML'
+    obj.use          = [ 'libpbd', 'libevoral', 'libardour', 'libgtkmm2ext', 'libevoral' ]
     obj.name         = 'libcanvas'
     obj.target       = 'canvas'
     obj.vnum         = CANVAS_LIB_VERSION
-    obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
-    obj.defines      = [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
-    
-    if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
+    obj.install_path = bld.env['LIBDIR']
+    obj.defines      += [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
+
+    # canvas unit-tests are outdated
+    if False and bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
+            unit_testobj              = bld(features = 'cxx cxxprogram')
+            unit_testobj.source       = '''
+                    test/group.cc
+                    test/arrow.cc
+                    test/optimizing_lookup_table.cc
+                    test/polygon.cc
+                    test/types.cc
+                    test/render.cc
+                    test/xml.cc
+                    test/wave_view.cc
+                    test/item.cc
+                    test/testrunner.cpp
+                '''.split()
+
+            unit_testobj.includes     = obj.includes + ['test', '../pbd']
+            unit_testobj.uselib       = 'CPPUNIT SIGCPP CAIROMM GTKMM'
+            unit_testobj.uselib_local = 'libcanvas libevoral libardour libgtkmm2ext'
+            unit_testobj.name         = 'libcanvas-unit-tests'
+            unit_testobj.target       = 'run-tests'
+            unit_testobj.install_path = ''
+            unit_testobj.cxxflags     = ['-DPACKAGE="libcanvastest"']
+            unit_testobj.cxxflags     += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"']
+            unit_testobj.cxxflags     += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFDIR']) + '"']
+            unit_testobj.cxxflags     += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"']
 
             manual_tests              = '''
                         test/hello_world.cc
@@ -96,7 +132,7 @@ def build(bld):
             for t in manual_tests:
                     target = t[:-3]
                     name = t[t.find('/')+1:-3]
-                    manual_testobj = bld.new_task_gen('cxx', 'program')
+                    manual_testobj = bld(features = 'cxx cxxprogram')
                     manual_testobj.source = t
                     manual_testobj.includes = obj.includes + ['test', '../pbd']
                     manual_testobj.uselib       = 'CPPUNIT SIGCPP CAIROMM GTKMM'
@@ -104,32 +140,7 @@ def build(bld):
                     manual_testobj.name         = 'libcanvas-manual-test-%s' % name
                     manual_testobj.target       = target
                     manual_testobj.install_path = ''
-                    
-                    unit_testobj              = bld.new_task_gen('cxx', 'program')
-                    unit_testobj.source       = '''
-                        test/group.cc
-                        test/arrow.cc
-                        test/optimizing_lookup_table.cc
-                        test/polygon.cc
-                        test/types.cc
-                        test/render.cc
-                        test/xml.cc
-                        test/wave_view.cc
-                        test/item.cc
-                        test/testrunner.cpp
-                '''.split()
 
-                    unit_testobj.includes     = obj.includes + ['test', '../pbd']
-                    unit_testobj.uselib       = 'CPPUNIT SIGCPP CAIROMM GTKMM'
-                    unit_testobj.uselib_local = 'libcanvas libevoral libardour libgtkmm2ext'
-                    unit_testobj.name         = 'libcanvas-unit-tests'
-                    unit_testobj.target       = 'run-tests'
-                    unit_testobj.install_path = ''
-                    unit_testobj.cxxflags     = ['-DPACKAGE="libcanvastest"']
-                    unit_testobj.cxxflags     += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"']
-                    unit_testobj.cxxflags     += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"']
-                    unit_testobj.cxxflags     += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"']
-                    
             benchmarks = '''
                         benchmark/items_at_point.cc
                         benchmark/render_parts.cc
@@ -140,7 +151,7 @@ def build(bld):
             for t in benchmarks:
                     target = t[:-3]
                     name = t[t.find('/')+1:-3]
-                    manual_testobj = bld.new_task_gen('cxx', 'program')
+                    manual_testobj = bld(features = 'cxx cxxprogram')
                     manual_testobj.source = [ t, 'benchmark/benchmark.cc' ]
                     manual_testobj.includes = obj.includes + ['test', '../pbd']
                     manual_testobj.uselib       = 'CPPUNIT SIGCPP CAIROMM GTKMM'