2008-09-30 11:34:54 -04:00
|
|
|
#!/usr/bin/env python
|
2008-10-12 22:43:14 -04:00
|
|
|
import autowaf
|
|
|
|
|
|
|
|
# Version of this package (even if built as a child)
|
|
|
|
EVORAL_VERSION = '0.0.0'
|
|
|
|
|
|
|
|
# Library version (UNIX style major, minor, micro)
|
|
|
|
# major increment <=> incompatible changes
|
|
|
|
# minor increment <=> compatible changes (additions)
|
|
|
|
# micro increment <=> no interface changes
|
|
|
|
# Version history:
|
|
|
|
# 0.0.0 = 0,0,0
|
|
|
|
EVORAL_LIB_VERSION = '0.0.0'
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
# Variables for 'waf dist'
|
|
|
|
APPNAME = 'evoral'
|
2008-10-12 22:43:14 -04:00
|
|
|
VERSION = EVORAL_VERSION
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
# Mandatory variables
|
|
|
|
srcdir = '.'
|
|
|
|
blddir = 'build'
|
|
|
|
|
|
|
|
def set_options(opt):
|
2008-10-12 22:43:14 -04:00
|
|
|
autowaf.set_options(opt)
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
def configure(conf):
|
2008-10-12 22:43:14 -04:00
|
|
|
autowaf.configure(conf)
|
|
|
|
autowaf.check_tool(conf, 'compiler_cxx')
|
2009-02-06 15:31:12 -05:00
|
|
|
autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
|
|
|
|
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0', mandatory=True)
|
2009-02-06 19:52:19 -05:00
|
|
|
autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
|
2008-09-30 11:34:54 -04:00
|
|
|
|
|
|
|
def build(bld):
|
2008-10-12 22:43:14 -04:00
|
|
|
# Headers
|
2009-02-06 15:31:12 -05:00
|
|
|
#bld.install_files('${INCLUDEDIR}/evoral', 'evoral/*.h')
|
|
|
|
#bld.install_files('${INCLUDEDIR}/evoral', 'evoral/*.hpp')
|
2008-09-30 11:34:54 -04:00
|
|
|
|
2008-10-12 22:43:14 -04:00
|
|
|
# Pkgconfig file
|
|
|
|
#autowaf.build_pc(bld, 'EVORAL', EVORAL_VERSION, 'GLIBMM GTHREAD')
|
|
|
|
|
|
|
|
# Library
|
2009-02-06 15:31:12 -05:00
|
|
|
obj = bld.new_task_gen('cxx', 'shlib')
|
2008-09-30 11:34:54 -04:00
|
|
|
obj.source = '''
|
|
|
|
src/Control.cpp
|
|
|
|
src/ControlList.cpp
|
|
|
|
src/ControlSet.cpp
|
|
|
|
src/Curve.cpp
|
|
|
|
src/Event.cpp
|
|
|
|
src/MIDIEvent.cpp
|
|
|
|
src/Note.cpp
|
|
|
|
src/SMF.cpp
|
|
|
|
src/SMFReader.cpp
|
|
|
|
src/Sequence.cpp
|
|
|
|
'''
|
2009-02-06 15:31:12 -05:00
|
|
|
obj.export_incdirs = ['.']
|
|
|
|
obj.includes = ['.', './src']
|
|
|
|
obj.name = 'libevoral'
|
|
|
|
obj.target = 'evoral'
|
|
|
|
obj.uselib = 'GLIBMM GTHREAD'
|
|
|
|
obj.vnum = EVORAL_LIB_VERSION
|
|
|
|
obj.install_path = ''
|
2008-09-30 11:34:54 -04:00
|
|
|
|
2008-10-12 22:43:14 -04:00
|
|
|
# Unit tests
|
2009-02-06 15:31:12 -05:00
|
|
|
obj = bld.new_task_gen('cxx', 'program')
|
2009-02-06 19:52:19 -05:00
|
|
|
obj.source = '''
|
|
|
|
test/sequence.cpp
|
|
|
|
test/testrunner.cpp
|
|
|
|
'''
|
2009-02-06 15:31:12 -05:00
|
|
|
obj.includes = ['.', './src']
|
2008-09-30 11:34:54 -04:00
|
|
|
obj.uselib_local = 'libevoral'
|
2009-02-06 19:11:17 -05:00
|
|
|
obj.uselib = 'CPPUNIT'
|
2009-02-06 19:52:19 -05:00
|
|
|
obj.target = 'run-tests'
|
2009-02-06 15:31:12 -05:00
|
|
|
obj.install_path = ''
|
2008-09-30 11:34:54 -04:00
|
|
|
|
2008-10-12 22:43:14 -04:00
|
|
|
def shutdown():
|
|
|
|
autowaf.shutdown()
|
|
|
|
|