#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import glob
import os
VERSION = LIBTAGLIB_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-path_prefix = 'libs/taglib/'
-
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
+ conf.load('compiler_cxx')
autowaf.configure(conf)
- conf.check_tool('compiler_cxx')
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
- sources = glob.glob(path_prefix + 'taglib/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/flac/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpc/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/id3v1/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/id3v2/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/id3v2/frames/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/vorbis/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/speex/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/flac/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/trueaudio/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/wavpack/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ape/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/toolkit/*.cpp')
- obj.source = []
- for i in sources:
- obj.source += [ i.replace(path_prefix, '') ]
+ obj = bld(features = 'cxx cxxshlib')
+ sources = bld.path.ant_glob('taglib/*.cpp')
+ sources += bld.path.ant_glob('taglib/flac/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpc/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/id3v1/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/id3v2/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/id3v2/frames/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/vorbis/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/speex/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/flac/*.cpp')
+ sources += bld.path.ant_glob('taglib/trueaudio/*.cpp')
+ sources += bld.path.ant_glob('taglib/wavpack/*.cpp')
+ sources += bld.path.ant_glob('taglib/ape/*.cpp')
+ sources += bld.path.ant_glob('taglib/toolkit/*.cpp')
+ obj.source = sources
include_dirs = '''
taglib
taglib/ogg/speex
taglib/ogg/flac
'''.split()
- obj.export_incdirs = ['.', 'taglib', 'taglib/toolkit']
+ obj.export_includes = ['.', 'taglib', 'taglib/toolkit']
obj.includes = include_dirs
obj.name = 'libtaglib'
obj.target = 'taglib'