mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2025-01-03 14:45:40 +01:00
wscript: require Opus Custom for build
Apparently, not all Linux distributions enable it. Anyway, we can build codec ourselves
This commit is contained in:
parent
4b05cf4399
commit
4110ee0928
2
3rdparty/opus/wscript
vendored
2
3rdparty/opus/wscript
vendored
@ -27,7 +27,7 @@ def build(bld):
|
||||
'opus/celt/opus_custom_demo.c'
|
||||
])
|
||||
includes = ['opus/include/', 'opus/celt/', 'opus/silk/', 'opus/silk/float/']
|
||||
defines = ['USE_ALLOCA', 'OPUS_BUILD', 'FLOAT_APPROX', 'PACKAGE_VERSION="1.3.1"']
|
||||
defines = ['USE_ALLOCA', 'OPUS_BUILD', 'FLOAT_APPROX', 'PACKAGE_VERSION="1.3.1"', 'CUSTOM_MODES']
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
|
4
wscript
4
wscript
@ -328,8 +328,8 @@ int main(int argc, char **argv) { strcasestr(argv[1], argv[2]); return 0; }'''
|
||||
|
||||
if not conf.options.BUILD_BUNDLED_DEPS:
|
||||
# check if we can use system opus
|
||||
if conf.check_pkg('opus', 'opus', '''#include <opus.h>
|
||||
int main(void){ return (opus_encoder_create(48000, 2, OPUS_APPLICATION_VOIP, 0) != 0) && (opus_decoder_create(48000, 2, 0) != 0);}''', fatal = False):
|
||||
if conf.check_pkg('opus', 'opus', '''#include <opus_custom.h>
|
||||
int main(void){ return opus_custom_mode_create(44100, 1024, 0) != 0; }''', fatal = False):
|
||||
conf.env.HAVE_SYSTEM_OPUS = True
|
||||
|
||||
conf.define('XASH_BUILD_COMMIT', conf.env.GIT_VERSION if conf.env.GIT_VERSION else 'notset')
|
||||
|
Loading…
Reference in New Issue
Block a user