second (and hopefully) final part of changes to respond to header format changes...
[ArdourMidi.git] / libs / midi++2 / wscript
blobaa6f8a67ca03749e4f9eeaee39e0e63d5f069fa5
1 #!/usr/bin/env python
2 import autowaf
3 import os
4 import sys
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)
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'
18 # Variables for 'waf dist'
19 APPNAME = 'libmidipp'
20 VERSION = LIBMIDIPP_VERSION
22 # Mandatory variables
23 srcdir = '.'
24 blddir = 'build'
26 path_prefix = 'libs/midi++2/'
28 def set_options(opt):
29 autowaf.set_options(opt)
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')
40 # Boost headers
41 autowaf.check_header(conf, 'boost/shared_ptr.hpp')
42 autowaf.check_header(conf, 'boost/weak_ptr.hpp')
44 def build(bld):
45 # Library
46 obj = bld.new_task_gen('cxx', 'shlib')
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_incdirs = ['.']
61 obj.includes = ['.', '../surfaces/control_protocol']
62 obj.name = 'libmidipp'
63 obj.target = 'midipp'
64 obj.uselib = 'GLIBMM SIGCPP XML JACK OSX'
65 obj.uselib_local = 'libpbd libevoral'
66 obj.vnum = LIBMIDIPP_LIB_VERSION
67 obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
69 def shutdown():
70 autowaf.shutdown()