Added zstd for windows

This commit is contained in:
unknown 2024-07-19 19:41:04 +02:00 committed by Kamay Xutax
parent ea72dde27d
commit b03545036b
4 changed files with 8 additions and 7 deletions

4
.gitmodules vendored
View file

@ -3,7 +3,7 @@
url = https://github.com/xutaxkamay/source-engine-thirdparty
[submodule "ivp"]
path = ivp
url = https://github.com/nillerusr/source-physics
url = https://github.com/xutaxkamay/source-physics
[submodule "lib"]
path = lib
url = https://github.com/nillerusr/source-engine-libs.git
url = https://github.com/xutaxkamay/source-engine-libs.git

2
lib

@ -1 +1 @@
Subproject commit 86a66ee92d9fda0a09f54a435e850faa7ab5d0fa
Subproject commit 040703157804a765f6d4e7b0fcc825d7a1ecdc44

@ -1 +1 @@
Subproject commit b7d0d33bb36ffbced774c08ff974a073499a67f2
Subproject commit 03bc0592cf7eb74d89979feeb7d91a6db2b13329

View file

@ -327,11 +327,11 @@ def options(opt):
opt.load('reconfigure')
def check_deps(conf):
conf.check_cc(lib='zstd', mandatory=False)
if conf.env.DEST_OS != 'win32':
conf.check_cc(lib='dl', mandatory=False)
conf.check_cc(lib='bz2', mandatory=True)
conf.check_cc(lib='rt', mandatory=False)
conf.check_cc(lib='zstd', mandatory=True)
if not conf.env.LIB_M: # HACK: already added in xcompile!
conf.check_cc(lib='m')
@ -417,6 +417,7 @@ def check_deps(conf):
if conf.env.DEST_OS == 'win32':
conf.check(lib='libz', uselib_store='ZLIB', define_name='USE_ZLIB')
conf.check(lib='libzstd', uselib_store='ZSTD')
# conf.check(lib='nvtc', uselib_store='NVTC')
# conf.check(lib='ati_compress_mt_vc10', uselib_store='ATI_COMPRESS_MT_VC10')
conf.check(lib='SDL2', uselib_store='SDL2')
@ -492,7 +493,6 @@ def configure(conf):
cflags, linkflags = conf.get_optimization_flags()
flags = []
if conf.options.SANITIZE:
@ -534,6 +534,7 @@ def configure(conf):
linkflags += flags
else:
cflags += [
'/I'+os.path.abspath('.')+'/thirdparty/zstd/include',
'/I'+os.path.abspath('.')+'/thirdparty/SDL',
'/arch:SSE' if conf.env.DEST_CPU == 'x86' else '/arch:AVX',
'/GF',
@ -545,7 +546,7 @@ def configure(conf):
'/TP',
'/EHsc'
]
if conf.options.BUILD_TYPE == 'debug':
linkflags += [
'/FORCE:MULTIPLE',