Waf building of gtk2_ardour.
[ardour.git] / libs / surfaces / wscript
1 #!/usr/bin/env python
2 import autowaf
3
4 # Version of this package (even if built as a child)
5 LIBSURFACES_VERSION = '0.0.0'
6
7 # Library version (UNIX style major, minor, micro)
8 # major increment <=> incompatible changes
9 # minor increment <=> compatible changes (additions)
10 # micro increment <=> no interface changes
11 LIBSURFACES_LIB_VERSION = '4.1.0'
12
13 # Variables for 'waf dist'
14 APPNAME = 'libsurfaces'
15 VERSION = LIBSURFACES_VERSION
16
17 # Mandatory variables
18 srcdir = '.'
19 blddir = 'build'
20
21 def set_options(opt):
22         autowaf.set_options(opt)
23
24 def configure(conf):
25         autowaf.configure(conf)
26         autowaf.check_tool(conf, 'compiler_cxx')
27         autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
28         autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
29         autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
30         autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
31         autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
32
33         conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
34         conf.write_config_header('wafconfig.h')
35
36         # Boost headers
37         autowaf.check_header(conf, 'boost/shared_ptr.hpp')
38         autowaf.check_header(conf, 'boost/weak_ptr.hpp')
39
40 def build(bld):
41         # Library
42         obj = bld.new_task_gen('cxx', 'shlib')
43         obj.source = '''
44                 control_protocol/basic_ui.cc
45                 control_protocol/control_protocol.cc
46                 control_protocol/smpte.cc
47         '''
48         obj.export_incdirs = ['./control_protocol']
49         obj.cxxflags     = '-DPACKAGE=\\\"ardour_cp\\\"'
50         obj.includes     = ['.', './control_protocol']
51         obj.name         = 'libsurfaces'
52         obj.target       = 'surfaces'
53         obj.uselib_local = 'libardour'
54         obj.vnum         = LIBSURFACES_LIB_VERSION
55         obj.install_path = ''
56         
57 def shutdown():
58         autowaf.shutdown()
59