2 from waflib.extras import autowaf as autowaf
3 from waflib import Options
4 from waflib import TaskGen
7 # Version of this package (even if built as a child)
11 ZRESAMPLER_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
13 # Library version (UNIX style major, minor, micro)
14 # major increment <=> incompatible changes
15 # minor increment <=> compatible changes (additions)
16 # micro increment <=> no interface changes
17 ZRESAMPLER_LIB_VERSION = '1.6.0'
19 # Variables for 'waf dist'
20 APPNAME = 'zita-resampler'
21 VERSION = ZRESAMPLER_VERSION
22 I18N_PACKAGE = 'libzita-resampler'
28 zresampler_sources = [
37 autowaf.set_options(opt)
40 if conf.is_defined('USE_EXTERNAL_LIBS'):
41 autowaf.check_pkg(conf, 'zita-resampler', uselib_store='LIBZRESAMPLER', atleast_version=ZRESAMPLER_LIB_VERSION, mandatory=True)
43 conf.load ('compiler_cxx')
44 autowaf.configure(conf)
47 if bld.is_defined('USE_EXTERNAL_LIBS'):
50 obj = bld.stlib(features = 'cxx cxxstlib', source = zresampler_sources)
51 obj.cxxflags = [ '-fPIC', '-O3', '-ffast-math' ]
52 obj.export_includes = ['.']
54 obj.name = 'zita-resampler'
55 obj.target = 'zita-resampler'
56 obj.vnum = ZRESAMPLER_LIB_VERSION
57 obj.install_path = bld.env['LIBDIR']
58 obj.defines = [ 'PACKAGE="' + I18N_PACKAGE + '"' ]