engine: wscript: ensure we always add needed features when mixing C and C++ objects. Simplify bld call for all platforms
This commit is contained in:
parent
a15c1f99b2
commit
f7eb8cd913
1 changed files with 33 additions and 33 deletions
|
@ -235,41 +235,41 @@ def build(bld):
|
||||||
is_cxx_link = True
|
is_cxx_link = True
|
||||||
libs += ['opus', 'bzip2', 'MultiEmulator']
|
libs += ['opus', 'bzip2', 'MultiEmulator']
|
||||||
|
|
||||||
includes = ['server', 'client', 'client/vgui' ]
|
rpath = bld.env.DEFAULT_RPATH
|
||||||
|
|
||||||
# Switch and PSVita have custom parameters
|
# Switch and PSVita have custom parameters
|
||||||
if bld.env.DEST_OS in ['nswitch', 'psvita']:
|
if bld.env.DEST_OS in ['nswitch', 'psvita']:
|
||||||
bld(source = source,
|
rpath = None
|
||||||
target = 'xash',
|
install_path = None
|
||||||
features = 'c cxxprogram',
|
features = 'cxx c cxxprogram cprogram'
|
||||||
includes = includes,
|
# Always build as shared library on Android
|
||||||
use = libs,
|
elif bld.env.DISABLE_LAUNCHER and bld.env.DEST_OS != 'android':
|
||||||
install_path = None,
|
install_path = bld.env.BINDIR
|
||||||
nro_install_path = bld.env.BINDIR,
|
if bld.env.STATIC:
|
||||||
nacp = 'platform/nswitch/xash3d-fwgs.nacp',
|
features = 'cxx c cxxprogram_static cprogram_static'
|
||||||
icon = 'platform/nswitch/icon.jpg',
|
elif is_cxx_link:
|
||||||
sce_sys = 'platform/psvita/sce_sys',
|
features = 'cxx c cxxprogram cprogram'
|
||||||
title_id = 'XASH10000',
|
|
||||||
app_name = 'xash3d-fwgs'
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
# always build as shared library on Android
|
|
||||||
if bld.env.DISABLE_LAUNCHER and bld.env.DEST_OS != "android":
|
|
||||||
install_path = bld.env.BINDIR
|
|
||||||
program = 'cxxprogram' if is_cxx_link else 'cprogram'
|
|
||||||
if bld.env.STATIC:
|
|
||||||
program += '_static'
|
|
||||||
features = ['c', program]
|
|
||||||
else:
|
else:
|
||||||
install_path = bld.env.LIBDIR
|
features = 'c cprogram'
|
||||||
features = ['c', 'cxxshlib' if is_cxx_link else 'cshlib']
|
else:
|
||||||
|
install_path = bld.env.LIBDIR
|
||||||
|
if is_cxx_link:
|
||||||
|
features = 'cxx c cxxshlib cshlib'
|
||||||
|
else:
|
||||||
|
features = 'c cshlib'
|
||||||
|
|
||||||
bld(source = source,
|
bld(source = source,
|
||||||
target = 'xash',
|
target = 'xash',
|
||||||
features = features,
|
features = features,
|
||||||
includes = includes,
|
includes = 'server client client/vgui',
|
||||||
use = libs,
|
use = libs,
|
||||||
install_path = install_path,
|
install_path = install_path,
|
||||||
subsystem = bld.env.MSVC_SUBSYSTEM,
|
nro_install_path = bld.env.BINDIR,
|
||||||
rpath = bld.env.DEFAULT_RPATH,
|
nacp = 'platform/nswitch/xash3d-fwgs.nacp',
|
||||||
)
|
icon = 'platform/nswitch/icon.jpg',
|
||||||
|
sce_sys = 'platform/psvita/sce_sys',
|
||||||
|
title_id = 'XASH10000',
|
||||||
|
app_name = 'xash3d-fwgs',
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
|
rpath = rpath,
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue