3rdparty: opusfile: added wscript for libopusfile

This commit is contained in:
SNMetamorph 2024-11-30 16:45:58 +04:00 committed by Alibek Omarov
parent 33901afa57
commit 8e5d0a6425
2 changed files with 33 additions and 0 deletions

32
3rdparty/opusfile/wscript vendored Normal file
View file

@ -0,0 +1,32 @@
#! /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',
features = 'c',
includes = ['opusfile/include/'],
use = ['libogg', 'opus'],
export_includes = ['opusfile/include/']
)

View file

@ -99,6 +99,7 @@ SUBDIRS = [
Subproject('3rdparty/libogg', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/vorbis/libvorbis', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/vorbis/libvorbisfile', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/opusfile', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/MultiEmulator',lambda x: not x.env.DEDICATED),
# Subproject('3rdparty/freevgui', lambda x: not x.env.DEDICATED),
Subproject('stub/client', lambda x: not x.env.DEDICATED),