02a71b3f48b451a2328b1b6092579ef5c1631fd6
[ardour.git] / libs / evoral / wscript
1 #!/usr/bin/env python
2 import autowaf
3
4 # Version of this package (even if built as a child)
5 EVORAL_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 # Version history:
12 #   0.0.0 = 0,0,0
13 EVORAL_LIB_VERSION = '0.0.0'
14
15 # Variables for 'waf dist'
16 APPNAME = 'evoral'
17 VERSION = EVORAL_VERSION
18
19 # Mandatory variables
20 srcdir = '.'
21 blddir = 'build'
22
23 def set_options(opt):
24         autowaf.set_options(opt)
25
26 def configure(conf):
27         autowaf.configure(conf)
28         autowaf.check_tool(conf, 'compiler_cxx')
29         autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
30         autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0', mandatory=True)
31         autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
32         autowaf.check_pkg(conf, 'smf', uselib_store='SMF', atleast_version='1.2', mandatory=False)
33
34 def build(bld):
35         # Headers
36         #bld.install_files('${INCLUDEDIR}/evoral', 'evoral/*.h')
37         #bld.install_files('${INCLUDEDIR}/evoral', 'evoral/*.hpp')
38         
39         # Pkgconfig file
40         #autowaf.build_pc(bld, 'EVORAL', EVORAL_VERSION, 'GLIBMM GTHREAD')
41         
42         # Library
43         obj = bld.new_task_gen('cxx', 'shlib')
44         obj.source = '''
45                 src/Control.cpp
46                 src/ControlList.cpp
47                 src/ControlSet.cpp
48                 src/Curve.cpp
49                 src/Event.cpp
50                 src/MIDIEvent.cpp
51                 src/Note.cpp
52                 src/SMF.cpp
53                 src/SMFReader.cpp
54                 src/LibSMF.cpp
55                 src/Sequence.cpp
56         '''
57         obj.export_incdirs = ['.']
58         obj.includes     = ['.', './src']
59         obj.name         = 'libevoral'
60         obj.target       = 'evoral'
61         obj.uselib       = 'GLIBMM GTHREAD SMF'
62         obj.vnum         = EVORAL_LIB_VERSION
63         obj.install_path = ''
64         
65         # Unit tests
66         obj              = bld.new_task_gen('cxx', 'program')
67         obj.source       = '''
68                 test/SequenceTest.cpp
69                 test/SMFTest.cpp
70                 test/testrunner.cpp
71         '''
72         obj.includes     = ['.', './src']
73         obj.uselib_local = 'libevoral'
74         obj.uselib       = 'CPPUNIT'
75         obj.target       = 'run-tests'
76         obj.install_path = ''
77
78 def shutdown():
79         autowaf.shutdown()
80