mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-06 12:25:00 +08:00
wscript: refactor opus wscript files, now it builds only if system package wasn't found
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
# encoding: utf-8
|
||||
|
||||
import os
|
||||
|
||||
def options(opt):
|
||||
pass
|
||||
|
||||
def configure(conf):
|
||||
path = conf.path.find_dir('3rdparty/opus')
|
||||
conf.env.LIB_OPUS = ['opus']
|
||||
conf.env.INCLUDES_OPUS = [path.find_dir('include/').abspath()]
|
||||
|
||||
def build(bld):
|
||||
path = bld.path.find_dir('3rdparty/opus')
|
||||
|
||||
sources = path.ant_glob([
|
||||
'src/*.c',
|
||||
'celt/*.c',
|
||||
'silk/*.c',
|
||||
'silk/float/*.c'])
|
||||
|
||||
includes = [
|
||||
path.find_dir('include/'),
|
||||
path.find_dir('celt/'),
|
||||
path.find_dir('silk/'),
|
||||
path.find_dir('silk/float/')
|
||||
]
|
||||
|
||||
defines = [
|
||||
'USE_ALLOCA',
|
||||
'OPUS_BUILD',
|
||||
'PACKAGE_VERSION="1.3.1"'
|
||||
]
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
target = 'opus',
|
||||
features = 'c',
|
||||
includes = includes,
|
||||
defines = defines,
|
||||
subsystem = bld.env.MSVC_SUBSYSTEM
|
||||
)
|
||||
Reference in New Issue
Block a user