Use FOUNDCFG* instead of setting the configuration by hand
[ardour.git] / libs / surfaces / osc / wscript
index 748b0f6940a18eb9804564f305b7f88e7dc8cf32..6f2bbfa0a53f1a9869ba5eefc072034a50ea8fff 100644 (file)
@@ -1,46 +1,37 @@
 #!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
 import os
 
-# Version of this package (even if built as a child)
-LIBSURFACES_VERSION = '4.1.0'
-
-# Library version (UNIX style major, minor, micro)
-# major increment <=> incompatible changes
-# minor increment <=> compatible changes (additions)
-# micro increment <=> no interface changes
-LIBSURFACES_LIB_VERSION = '4.1.0'
-
-# Variables for 'waf dist'
-APPNAME = 'libsurfaces'
-VERSION = LIBSURFACES_VERSION
-
 # Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
 
-def set_options(opt):
-       autowaf.set_options(opt)
+def options(opt):
+    autowaf.set_options(opt)
 
 def configure(conf):
-       autowaf.configure(conf)
+    autowaf.configure(conf)
 
 def build(bld):
-       obj = bld.new_task_gen('cxx', 'shlib')
-       obj.source = '''
-               osc.cc
-               osc_controllable.cc
-               interface.cc
-       '''
-       obj.export_incdirs = ['./osc']
-       obj.cxxflags     = '-DPACKAGE="ardour_cp"'
-       obj.includes     = ['.', './osc']
-       obj.name         = 'libsurfaces'
-       obj.target       = 'surfaces'
-       obj.uselib_local = 'libardour'
-       obj.vnum         = LIBSURFACES_LIB_VERSION
-       obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
+    obj = bld(features = 'cxx cxxshlib')
+    obj.source = '''
+            osc.cc
+            osc_controllable.cc
+            osc_route_observer.cc
+            osc_select_observer.cc
+            osc_global_observer.cc
+            interface.cc
+            osc_gui.cc
+    '''
+    obj.export_includes = ['.']
+    obj.defines      = [ 'PACKAGE="ardour_osc"' ]
+    obj.defines     += [ 'ARDOURSURFACE_DLL_EXPORTS' ]
+    obj.includes     = ['.', './osc']
+    obj.name         = 'libardour_osc'
+    obj.target       = 'ardour_osc'
+    obj.uselib       = 'LO GTKMM GTK GDK'
+    obj.use          = 'libardour libardour_cp libgtkmm2ext libpbd'
+    obj.install_path = os.path.join(bld.env['LIBDIR'], 'surfaces')
 
 def shutdown():
-       autowaf.shutdown()
-
+    autowaf.shutdown()