2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

wscript: move SUPPORT_BSP2_FORMAT definition to the main wscript file. Manually define REF_DLL in the build task

This commit is contained in:
Alibek Omarov 2024-11-02 01:57:33 +03:00
parent 42cf51c6aa
commit 93b382f174
4 changed files with 5 additions and 9 deletions

View File

@ -127,7 +127,6 @@ def configure(conf):
conf.define_cond('XASH_CUSTOM_SWAP', conf.options.CUSTOM_SWAP) conf.define_cond('XASH_CUSTOM_SWAP', conf.options.CUSTOM_SWAP)
conf.define_cond('XASH_ENABLE_MAIN', conf.env.DISABLE_LAUNCHER) conf.define_cond('XASH_ENABLE_MAIN', conf.env.DISABLE_LAUNCHER)
conf.define_cond('XASH_NO_ASYNC_NS_RESOLVE', conf.options.NO_ASYNC_RESOLVE) conf.define_cond('XASH_NO_ASYNC_NS_RESOLVE', conf.options.NO_ASYNC_RESOLVE)
conf.define_cond('SUPPORT_BSP2_FORMAT', conf.options.SUPPORT_BSP2_FORMAT)
conf.define_cond('DBGHELP', conf.env.DEST_OS == 'win32') conf.define_cond('DBGHELP', conf.env.DEST_OS == 'win32')
conf.define_cond('PSAPI_VERSION', conf.env.DEST_OS == 'win32') # will be defined as 1 conf.define_cond('PSAPI_VERSION', conf.env.DEST_OS == 'win32') # will be defined as 1

View File

@ -17,13 +17,10 @@ def options(opt):
return return
def configure(conf): def configure(conf):
conf.define_cond('SUPPORT_BSP2_FORMAT', conf.options.SUPPORT_BSP2_FORMAT)
conf.env.GL_STATIC = conf.options.GL_STATIC conf.env.GL_STATIC = conf.options.GL_STATIC
if conf.env.GL_STATIC: if conf.env.GL_STATIC:
conf.check(lib='GL') conf.check(lib='GL')
conf.define('REF_DLL', 1)
if conf.env.DEST_OS2 == 'android': if conf.env.DEST_OS2 == 'android':
conf.check_cc(lib='log') conf.check_cc(lib='log')
@ -74,6 +71,6 @@ def build(bld):
target = k, target = k,
includes = includes, includes = includes,
use = libs + v['libs'], use = libs + v['libs'],
defines = v['defines'], defines = v['defines'] + ['REF_DLL=1'],
install_path = bld.env.LIBDIR, install_path = bld.env.LIBDIR,
subsystem = bld.env.MSVC_SUBSYSTEM) subsystem = bld.env.MSVC_SUBSYSTEM)

View File

@ -8,12 +8,10 @@ import os
top = '.' top = '.'
def options(opt): def options(opt):
# stub
return return
def configure(conf): def configure(conf):
conf.define_cond('SUPPORT_BSP2_FORMAT', conf.options.SUPPORT_BSP2_FORMAT) return
conf.define('REF_DLL', 1)
def build(bld): def build(bld):
libs = [ 'engine_includes', 'werror' ] libs = [ 'engine_includes', 'werror' ]
@ -26,6 +24,7 @@ def build(bld):
bld.shlib(source = bld.path.ant_glob('*.c'), bld.shlib(source = bld.path.ant_glob('*.c'),
target = 'ref_soft', target = 'ref_soft',
includes = '.', includes = '.',
defines = 'REF_DLL=1',
use = libs, use = libs,
install_path = bld.env.LIBDIR, install_path = bld.env.LIBDIR,
subsystem = bld.env.MSVC_SUBSYSTEM subsystem = bld.env.MSVC_SUBSYSTEM

View File

@ -375,7 +375,8 @@ def configure(conf):
conf.env.ENABLE_UTILS = conf.options.ENABLE_UTILS conf.env.ENABLE_UTILS = conf.options.ENABLE_UTILS
conf.env.ENABLE_FUZZER = conf.options.ENABLE_FUZZER conf.env.ENABLE_FUZZER = conf.options.ENABLE_FUZZER
conf.env.DEDICATED = conf.options.DEDICATED conf.env.DEDICATED = conf.options.DEDICATED
conf.env.SUPPORT_BSP2_FORMAT = conf.options.SUPPORT_BSP2_FORMAT
conf.define_cond('SUPPORT_BSP2_FORMAT', conf.options.SUPPORT_BSP2_FORMAT)
# disable game_launch compiling on platform where it's not needed # disable game_launch compiling on platform where it's not needed
conf.env.DISABLE_LAUNCHER = conf.env.DEST_OS in ['android', 'nswitch', 'psvita', 'dos'] or conf.env.MAGX or conf.env.DEDICATED or conf.env.STATIC_LINKING conf.env.DISABLE_LAUNCHER = conf.env.DEST_OS in ['android', 'nswitch', 'psvita', 'dos'] or conf.env.MAGX or conf.env.DEDICATED or conf.env.STATIC_LINKING