Clean up checks.
[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, 'libxml-2.0', uselib_store='XML')
28         autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
29         autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
30
31         conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
32         conf.write_config_header('wafconfig.h')
33
34         # Boost headers
35         autowaf.check_header(conf, 'boost/shared_ptr.hpp')
36         autowaf.check_header(conf, 'boost/weak_ptr.hpp')
37
38 def build(bld):
39         # Library
40         obj = bld.new_task_gen('cxx', 'shlib')
41         obj.source = '''
42                 control_protocol/basic_ui.cc
43                 control_protocol/control_protocol.cc
44                 control_protocol/smpte.cc
45         '''
46         obj.export_incdirs = ['./control_protocol']
47         obj.cxxflags     = '-DPACKAGE=\\\"ardour_cp\\\"'
48         obj.includes     = ['.', './control_protocol']
49         obj.name         = 'libsurfaces'
50         obj.target       = 'surfaces'
51         obj.uselib_local = 'libardour'
52         obj.vnum         = LIBSURFACES_LIB_VERSION
53         obj.install_path = ''
54         
55 def shutdown():
56         autowaf.shutdown()
57