Waf building of taglib and vamp-sdk.
git-svn-id: svn://localhost/ardour2/branches/3.0@4660 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5b9433f42f
commit
5fe3401814
@ -89,9 +89,12 @@ def check_tool(conf, name):
|
||||
conf.check_tool(name)
|
||||
checked[name] = True
|
||||
|
||||
def nameify(name):
|
||||
return name.replace('/', '_').replace('++', 'PP').replace('-', '_')
|
||||
|
||||
def check_pkg(conf, name, **args):
|
||||
"Check for a package iff it hasn't been checked for yet"
|
||||
var_name = 'HAVE_' + args['uselib_store'].replace('/', '_').replace('++', 'PP')
|
||||
var_name = 'HAVE_' + nameify(args['uselib_store'])
|
||||
check = not var_name in conf.env
|
||||
if not check and 'atleast_version' in args:
|
||||
# Re-check if version is newer than previous check
|
||||
@ -198,7 +201,7 @@ def configure(conf):
|
||||
g_step = 2
|
||||
|
||||
def set_local_lib(conf, name, has_objects):
|
||||
conf.define('HAVE_' + name.upper().replace('/', '_').replace('++', 'PP'), 1)
|
||||
conf.define('HAVE_' + nameify(name.upper()), 1)
|
||||
if has_objects:
|
||||
if type(conf.env['AUTOWAF_LOCAL_LIBS']) != dict:
|
||||
conf.env['AUTOWAF_LOCAL_LIBS'] = {}
|
||||
|
78
libs/taglib/wscript
Normal file
78
libs/taglib/wscript
Normal file
@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env python
|
||||
import autowaf
|
||||
import glob
|
||||
|
||||
# Version of this package (even if built as a child)
|
||||
LIBTAGLIB_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
|
||||
LIBTAGLIB_LIB_VERSION = '0.0.0'
|
||||
|
||||
# Variables for 'waf dist'
|
||||
APPNAME = 'libtaglib'
|
||||
VERSION = LIBTAGLIB_VERSION
|
||||
|
||||
# Mandatory variables
|
||||
srcdir = '.'
|
||||
blddir = 'build'
|
||||
|
||||
def set_options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
autowaf.configure(conf)
|
||||
autowaf.check_tool(conf, 'compiler_cxx')
|
||||
conf.write_config_header('config.h')
|
||||
|
||||
def build(bld):
|
||||
# Library
|
||||
obj = bld.new_task_gen('cxx', 'shlib')
|
||||
prefix = 'libs/taglib/'
|
||||
sources = glob.glob(prefix + 'taglib/*.cpp')
|
||||
sources += glob.glob(prefix + 'libs//taglib/flac/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/mpc/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/mpeg/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/mpeg/id3v1/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/mpeg/id3v2/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/mpeg/id3v2/frames/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/ogg/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/ogg/vorbis/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/ogg/speex/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/ogg/flac/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/trueaudio/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/wavpack/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/ape/*.cpp')
|
||||
sources += glob.glob(prefix + 'taglib/toolkit/*.cpp')
|
||||
obj.source = []
|
||||
for i in sources:
|
||||
obj.source += [ i.replace(prefix, '') ]
|
||||
|
||||
include_dirs = '''
|
||||
taglib
|
||||
taglib/toolkit
|
||||
taglib/flac
|
||||
taglib/ape
|
||||
taglib/mpc
|
||||
taglib/mpeg
|
||||
taglib/mpeg/id3v1
|
||||
taglib/mpeg/id3v2
|
||||
taglib/wavpack
|
||||
taglib/trueaudio
|
||||
taglib/ogg
|
||||
taglib/ogg/vorbis
|
||||
taglib/ogg/speex
|
||||
taglib/ogg/flac
|
||||
'''.split()
|
||||
obj.export_incdirs = include_dirs
|
||||
obj.includes = include_dirs
|
||||
obj.name = 'libtaglib'
|
||||
obj.target = 'taglib'
|
||||
obj.vnum = LIBTAGLIB_LIB_VERSION
|
||||
obj.install_path = ''
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
53
libs/vamp-sdk/wscript
Normal file
53
libs/vamp-sdk/wscript
Normal file
@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env python
|
||||
import autowaf
|
||||
|
||||
# Version of this package (even if built as a child)
|
||||
LIBVAMP_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
|
||||
LIBVAMP_LIB_VERSION = '0.0.0'
|
||||
|
||||
# Variables for 'waf dist'
|
||||
APPNAME = 'libvamp'
|
||||
VERSION = LIBVAMP_VERSION
|
||||
|
||||
# Mandatory variables
|
||||
srcdir = '.'
|
||||
blddir = 'build'
|
||||
|
||||
def set_options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
||||
def configure(conf):
|
||||
autowaf.configure(conf)
|
||||
autowaf.check_tool(conf, 'compiler_cxx')
|
||||
autowaf.check_pkg(conf, 'fftw3', uselib_store='FFTW3', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
|
||||
conf.env.append_value('CXXFLAGS', '-DHAVE_FFTW3')
|
||||
|
||||
def build(bld):
|
||||
# Library
|
||||
obj = bld.new_task_gen('cxx', 'shlib')
|
||||
obj.source = '''
|
||||
vamp-sdk/PluginHostAdapter.cpp
|
||||
vamp-sdk/hostext/PluginBufferingAdapter.cpp
|
||||
vamp-sdk/hostext/PluginChannelAdapter.cpp
|
||||
vamp-sdk/hostext/PluginInputDomainAdapter.cpp
|
||||
vamp-sdk/hostext/PluginLoader.cpp
|
||||
vamp-sdk/hostext/PluginWrapper.cpp
|
||||
vamp-sdk/RealTime.cpp
|
||||
'''
|
||||
obj.export_incdirs = ['.']
|
||||
obj.includes = ['.']
|
||||
obj.name = 'libvamp'
|
||||
obj.target = 'vamp'
|
||||
obj.uselib = 'FFTW3 FFTW3F'
|
||||
obj.vnum = LIBVAMP_LIB_VERSION
|
||||
obj.install_path = ''
|
||||
|
||||
def shutdown():
|
||||
autowaf.shutdown()
|
||||
|
10
wscript
10
wscript
@ -9,7 +9,15 @@ APPNAME = 'ardour'
|
||||
srcdir = '.'
|
||||
blddir = 'build'
|
||||
|
||||
children = [ 'libs/pbd', 'libs/midi++2', 'libs/evoral' ]
|
||||
children = [
|
||||
'libs/pbd',
|
||||
'libs/midi++2',
|
||||
'libs/evoral',
|
||||
'libs/vamp-sdk',
|
||||
'libs/taglib',
|
||||
# 'libs/surfaces',
|
||||
# 'libs/ardour'
|
||||
]
|
||||
|
||||
def set_options(opt):
|
||||
autowaf.set_options(opt)
|
||||
|
Loading…
Reference in New Issue
Block a user