enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
[ardour.git] / libs / surfaces / control_protocol / wscript
index e3092b56060471c6b22d55bc747a76597f663628..6a11cadb4adfeeb15ad89878efd44a7bf658a2ad 100644 (file)
@@ -2,17 +2,15 @@
 from waflib.extras import autowaf as autowaf
 import os
 
-# Library version (UNIX style major, minor, micro)
-# major increment <=> incompatible changes
-# minor increment <=> compatible changes (additions)
-# micro increment <=> no interface changes
-APPNAME = 'libardour_cp'
-LIBARDOUR_CP_LIB_VERSION = '4.1.0'
-
 # Mandatory variables
 top = '.'
 out = 'build'
 
+controlcp_sources = [
+    'basic_ui.cc',
+    'control_protocol.cc',
+    ]
+
 def options(opt):
     autowaf.set_options(opt)
 
@@ -20,19 +18,23 @@ def configure(conf):
     autowaf.configure(conf)
 
 def build(bld):
-    obj = bld(features = 'cxx cxxshlib')
-    obj.source = '''
-            basic_ui.cc
-            control_protocol.cc
-    '''
+    if bld.is_defined ('INTERNAL_SHARED_LIBS'):
+        obj              = bld.shlib(features = 'c cxx cshlib cxxshlib', source=controlcp_sources)
+        # defines for this library
+        obj.defines      = [ 'LIBCONTROLCP_DLL_EXPORTS' ]
+    else:
+        obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources)
+        obj.cxxflags     = [ '-fPIC' ]
+        obj.defines      = [ ]
+
     obj.export_includes = ['.', './control_protocol' ]
-    obj.cxxflags     = '-DPACKAGE="ardour_cp" -fPIC'
+    obj.defines    +=  [ 'PACKAGE="ardour_cp"' ]
     obj.includes     = ['.', './control_protocol']
     obj.name         = 'libardour_cp'
     obj.target       = 'ardourcp'
-    obj.use          = 'libardour libtimecode'
-    obj.vnum         = LIBARDOUR_CP_LIB_VERSION
-    obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
+    obj.use          = 'libardour libpbd'
+    obj.uselib       = 'GLIBMM SIGCPP XML'
+    obj.install_path = bld.env['LIBDIR']
 
 def shutdown():
     autowaf.shutdown()