Upgrade to waf 1.6.7 and autowaf r52.
[ardour.git] / libs / midi++2 / wscript
1 #!/usr/bin/env python
2 from waflib.extras import autowaf as autowaf
3 import os
4 import sys
5
6 # Version of this package (even if built as a child)
7 MAJOR = '2'
8 MINOR = '1'
9 MICRO = '1'
10 LIBMIDIPP_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
11
12 # Library version (UNIX style major, minor, micro)
13 # major increment <=> incompatible changes
14 # minor increment <=> compatible changes (additions)
15 # micro increment <=> no interface changes
16 LIBMIDIPP_LIB_VERSION = '4.1.0'
17
18 # Variables for 'waf dist'
19 APPNAME = 'libmidipp'
20 VERSION = LIBMIDIPP_VERSION
21
22 # Mandatory variables
23 top = '.'
24 out = 'build'
25
26 path_prefix = 'libs/midi++2/'
27
28 def options(opt):
29     autowaf.set_options(opt)
30
31 def configure(conf):
32     autowaf.build_version_files(path_prefix+'midi++/version.h', path_prefix+'version.cc',
33                     'midipp', MAJOR, MINOR, MICRO)
34     autowaf.configure(conf)
35     conf.check_tool('compiler_cxx')
36     autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.118.2')
37     autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
38     autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
39
40     # Boost headers
41     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
42     autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
43
44 def build(bld):
45     # Library
46     obj = bld(features = 'cxx cxxshlib')
47     obj.source = '''
48             midi.cc
49             channel.cc
50             manager.cc
51             parser.cc
52             port.cc
53             midnam_patch.cc
54             mmc.cc
55             mtc.cc
56             version.cc
57     '''
58     # everybody loves JACK
59     obj.cxxflags = [ '-DWITH_JACK_MIDI' ]
60     obj.export_includes = ['.']
61     obj.includes     = ['.', '../surfaces/control_protocol']
62     obj.name         = 'libmidipp'
63     obj.target       = 'midipp'
64     obj.uselib       = 'GLIBMM SIGCPP XML JACK OSX'
65     obj.use          = 'libpbd libevoral libtimecode'
66     obj.vnum         = LIBMIDIPP_LIB_VERSION
67     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
68
69 def shutdown():
70     autowaf.shutdown()