add support for IP MIDI (multicast MIDI over IP UDP sockets) to ardour and use it...
[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     conf.load('compiler_cxx')
33     autowaf.build_version_files(path_prefix+'midi++/version.h', path_prefix+'version.cc',
34                     'midipp', MAJOR, MINOR, MICRO)
35     autowaf.configure(conf)
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             ipmidi_port.cc
51             jack_midi_port.cc
52             manager.cc
53             parser.cc
54             port.cc
55             midnam_patch.cc
56             mmc.cc
57             mtc.cc
58             version.cc
59     '''
60     # everybody loves JACK
61     obj.cxxflags = [ '-DWITH_JACK_MIDI' ]
62     obj.export_includes = ['.']
63     obj.includes     = ['.', '../surfaces/control_protocol']
64     obj.name         = 'libmidipp'
65     obj.target       = 'midipp'
66     obj.uselib       = 'GLIBMM SIGCPP XML JACK OSX'
67     obj.use          = 'libpbd libevoral libtimecode'
68     obj.vnum         = LIBMIDIPP_LIB_VERSION
69     obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
70
71 def shutdown():
72     autowaf.shutdown()