Revert redundant kludge.
[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
33 def build(bld):
34         # Headers
35         #bld.install_files('${INCLUDEDIR}/evoral', 'evoral/*.h')
36         #bld.install_files('${INCLUDEDIR}/evoral', 'evoral/*.hpp')
37         
38         # Pkgconfig file
39         #autowaf.build_pc(bld, 'EVORAL', EVORAL_VERSION, 'GLIBMM GTHREAD')
40         
41         # Library
42         obj = bld.new_task_gen('cxx', 'shlib')
43         obj.source = '''
44                 src/Control.cpp
45                 src/ControlList.cpp
46                 src/ControlSet.cpp
47                 src/Curve.cpp
48                 src/Event.cpp
49                 src/MIDIEvent.cpp
50                 src/Note.cpp
51                 src/SMF.cpp
52                 src/SMFReader.cpp
53                 src/Sequence.cpp
54         '''
55         obj.export_incdirs = ['.']
56         obj.includes     = ['.', './src']
57         obj.name         = 'libevoral'
58         obj.target       = 'evoral'
59         obj.uselib       = 'GLIBMM GTHREAD'
60         obj.vnum         = EVORAL_LIB_VERSION
61         obj.install_path = ''
62         
63         # Unit tests
64         obj              = bld.new_task_gen('cxx', 'program')
65         obj.source       = '''
66                 test/sequence.cpp
67                 test/testrunner.cpp
68         '''
69         obj.includes     = ['.', './src']
70         obj.uselib_local = 'libevoral'
71         obj.uselib       = 'CPPUNIT'
72         obj.target       = 'run-tests'
73         obj.install_path = ''
74
75 def shutdown():
76         autowaf.shutdown()
77