mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-18 06:51:16 +01:00
wscript: strip lib prefix from new opus and vorbis targets, don't link them in dedicated
This commit is contained in:
parent
6b6d3b3770
commit
51fa7d2611
6
3rdparty/libogg/wscript
vendored
6
3rdparty/libogg/wscript
vendored
@ -43,8 +43,8 @@ def build(bld):
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
target = 'libogg',
|
||||
target = 'ogg',
|
||||
use = 'libogg_config_types',
|
||||
includes = ['libogg/include/'],
|
||||
export_includes = ['libogg/include/']
|
||||
includes = 'libogg/include/',
|
||||
export_includes = 'libogg/include/'
|
||||
)
|
||||
|
8
3rdparty/opusfile/wscript
vendored
8
3rdparty/opusfile/wscript
vendored
@ -30,8 +30,8 @@ def build(bld):
|
||||
|
||||
bld.stlib(
|
||||
source = sources,
|
||||
target = 'libopusfile',
|
||||
includes = ['opusfile/include/'],
|
||||
use = ['libogg', 'opus'],
|
||||
export_includes = ['opusfile/include/']
|
||||
target = 'opusfile',
|
||||
includes = 'opusfile/include/',
|
||||
use = 'ogg opus',
|
||||
export_includes = 'opusfile/include/'
|
||||
)
|
||||
|
24
3rdparty/vorbis/wscript
vendored
24
3rdparty/vorbis/wscript
vendored
@ -22,7 +22,7 @@ def configure(conf):
|
||||
|
||||
if conf.check_cc(fragment=FRAGMENT_MEMORY_H, msg = 'Checking for memory.h header', mandatory = False):
|
||||
conf.define('USE_MEMORY_H', 1)
|
||||
|
||||
|
||||
conf.check_cc(fragment=FRAGMENT_ALLOCA_H, msg = 'Checking for alloca in alloca.h header', mandatory = False)
|
||||
|
||||
if conf.env.COMPILER_CC == 'msvc':
|
||||
@ -54,22 +54,18 @@ def build(bld):
|
||||
'vorbis-src/lib/bitrate.c'
|
||||
]
|
||||
|
||||
libvorbisfile_sources = [
|
||||
'vorbis-src/lib/vorbisfile.c'
|
||||
]
|
||||
|
||||
bld.stlib(
|
||||
source = libvorbis_sources,
|
||||
target = 'libvorbis',
|
||||
includes = ['vorbis-src/include/'],
|
||||
use = ['libogg'],
|
||||
export_includes = ['vorbis-src/include/']
|
||||
target = 'vorbis',
|
||||
includes = 'vorbis-src/include/',
|
||||
use = 'ogg',
|
||||
export_includes = 'vorbis-src/include/'
|
||||
)
|
||||
|
||||
bld.stlib(
|
||||
source = libvorbisfile_sources,
|
||||
target = 'libvorbisfile',
|
||||
includes = ['vorbis-src/include/'],
|
||||
use = ['libvorbis'],
|
||||
export_includes = ['vorbis-src/include/']
|
||||
source = 'vorbis-src/lib/vorbisfile.c',
|
||||
target = 'vorbisfile',
|
||||
includes = 'vorbis-src/include/',
|
||||
use = 'vorbis',
|
||||
export_includes = 'vorbis-src/include/'
|
||||
)
|
||||
|
@ -141,7 +141,7 @@ def build(bld):
|
||||
bld(name = 'engine_includes', export_includes = '. common common/imagelib', use = 'filesystem_includes')
|
||||
|
||||
is_cxx_link = False
|
||||
libs = [ 'engine_includes', 'public', 'dllemu', 'werror', 'opus', 'libvorbis', 'libvorbisfile', 'libopusfile' ]
|
||||
libs = [ 'engine_includes', 'public', 'dllemu', 'werror' ]
|
||||
|
||||
# basic build: dedicated only
|
||||
source = bld.path.ant_glob([
|
||||
@ -238,7 +238,7 @@ def build(bld):
|
||||
'client/soundlib/libmpg/*.c',
|
||||
])
|
||||
is_cxx_link = True
|
||||
libs += ['bzip2', 'MultiEmulator']
|
||||
libs += ['bzip2', 'MultiEmulator', 'opus', 'opusfile', 'vorbis', 'vorbisfile']
|
||||
|
||||
rpath = bld.env.DEFAULT_RPATH
|
||||
|
||||
|
22
wscript
22
wscript
@ -94,6 +94,10 @@ SUBDIRS = [
|
||||
Subproject('ref/soft', lambda x: not x.env.DEDICATED and not x.env.SUPPORT_BSP2_FORMAT and x.env.SOFT),
|
||||
Subproject('ref/null', lambda x: not x.env.DEDICATED and x.env.NULL),
|
||||
Subproject('3rdparty/bzip2', lambda x: not x.env.DEDICATED and not x.env.HAVE_SYSTEM_BZ2),
|
||||
Subproject('3rdparty/opus', lambda x: not x.env.DEDICATED and not x.env.HAVE_SYSTEM_OPUS),
|
||||
Subproject('3rdparty/libogg', lambda x: not x.env.DEDICATED and not x.env.HAVE_SYSTEM_OGG),
|
||||
Subproject('3rdparty/vorbis', lambda x: not x.env.DEDICATED and (not x.env.HAVE_SYSTEM_VORBIS or not x.env.HAVE_SYSTEM_VORBISFILE)),
|
||||
Subproject('3rdparty/opusfile', lambda x: not x.env.DEDICATED and not x.env.HAVE_SYSTEM_OPUSFILE),
|
||||
Subproject('3rdparty/mainui', lambda x: not x.env.DEDICATED),
|
||||
Subproject('3rdparty/vgui_support', lambda x: not x.env.DEDICATED),
|
||||
Subproject('3rdparty/MultiEmulator',lambda x: not x.env.DEDICATED),
|
||||
@ -102,12 +106,6 @@ SUBDIRS = [
|
||||
Subproject('game_launch', lambda x: not x.env.DISABLE_LAUNCHER),
|
||||
Subproject('engine'), # keep latest for static linking
|
||||
|
||||
# disable only by external dependency presense
|
||||
Subproject('3rdparty/opus', lambda x: not x.env.HAVE_SYSTEM_OPUS),
|
||||
Subproject('3rdparty/libogg', lambda x: not x.env.HAVE_SYSTEM_OGG),
|
||||
Subproject('3rdparty/vorbis', lambda x: not x.env.HAVE_SYSTEM_VORBIS and not x.env.HAVE_SYSTEM_VORBISFILE),
|
||||
Subproject('3rdparty/opusfile', lambda x: not x.env.HAVE_SYSTEM_OPUSFILE),
|
||||
|
||||
# enabled optionally
|
||||
Subproject('utils/mdldec', lambda x: x.env.ENABLE_UTILS),
|
||||
Subproject('utils/xar', lambda x: x.env.ENABLE_UTILS and x.env.ENABLE_XAR),
|
||||
@ -472,13 +470,11 @@ def configure(conf):
|
||||
else:
|
||||
conf.env.SHAREDIR = conf.env.LIBDIR = conf.env.BINDIR = conf.env.PREFIX
|
||||
|
||||
if not conf.options.BUILD_BUNDLED_DEPS:
|
||||
for i in (('ogg', 'libogg'),
|
||||
('opusfile', 'libopusfile'),
|
||||
('vorbis', 'libvorbis'),
|
||||
('vorbisfile', 'libvorbisfile')):
|
||||
if conf.check_cfg(package=i[0], uselib_store=i[1], args='--cflags --libs', mandatory=False):
|
||||
conf.env['HAVE_SYSTEM_%s' % i[0].upper()] = True
|
||||
# dedicated server don't have external dependencies
|
||||
if not conf.options.BUILD_BUNDLED_DEPS and not conf.options.DEDICATED:
|
||||
for i in ('ogg','opusfile','vorbis','vorbisfile'):
|
||||
if conf.check_cfg(package=i, uselib_store=i, args='--cflags --libs', mandatory=False):
|
||||
conf.env['HAVE_SYSTEM_%s' % i.upper()] = True
|
||||
|
||||
# search for opus 1.4 only, it has fixes for custom modes
|
||||
# 1.5 breaks custom modes: https://github.com/xiph/opus/issues/374
|
||||
|
Loading…
Reference in New Issue
Block a user