31 lines
756 B
Python
31 lines
756 B
Python
#! /usr/bin/env python
|
|
# encoding: utf-8
|
|
|
|
def options(opt):
|
|
pass
|
|
|
|
def configure(conf):
|
|
if not conf.path.find_dir('opusfile') or not conf.path.find_dir('opusfile/src'):
|
|
conf.fatal('Can\'t find opusfile submodule. Run `git submodule update --init --recursive`.')
|
|
return
|
|
|
|
if conf.env.COMPILER_CC == 'msvc':
|
|
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
|
|
conf.define('_CRT_SECURE_NO_DEPRECATE', 1)
|
|
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
|
|
|
|
def build(bld):
|
|
sources = [
|
|
'opusfile/src/info.c',
|
|
'opusfile/src/internal.c',
|
|
'opusfile/src/opusfile.c',
|
|
'opusfile/src/stream.c'
|
|
]
|
|
|
|
bld.stlib(
|
|
source = sources,
|
|
target = 'libopusfile',
|
|
includes = ['opusfile/include/'],
|
|
use = ['libogg', 'opus'],
|
|
export_includes = ['opusfile/include/']
|
|
)
|