3rdparty: libogg: added wscript for libogg

This commit is contained in:
SNMetamorph 2024-11-26 16:10:33 +04:00 committed by Alibek Omarov
parent 3e8bd16d2b
commit 3c6c90c1e7
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,48 @@
#! /usr/bin/env python
# encoding: utf-8
FRAGMENT_INTTYPES_H='''#include <inttypes.h>
int main (int argc, char **argv) {
return 0;
}'''
FRAGMENT_SYS_TYPES_H='''#include <sys/types.h>
int main (void) {
return 0;
}'''
FRAGMENT_STDINT_H='''#include <stdint.h>
int main (void) {
return 0;
}'''
def options(opt):
pass
def configure(conf):
if not conf.path.find_dir('libogg') or not conf.path.find_dir('libogg/src'):
conf.fatal('Can\'t find libogg submodule. Run `git submodule update --init --recursive`.')
return
# Check for required headers
if conf.check_cc(fragment=FRAGMENT_INTTYPES_H, msg = 'Checking for inttypes.h header', mandatory = False):
conf.define('INCLUDE_INTTYPES_H', 1)
elif conf.check_cc(fragment=FRAGMENT_SYS_TYPES_H, msg = 'Checking for sys/types.h header', mandatory = False):
conf.define('INCLUDE_SYS_TYPES_H', 1)
elif conf.check_cc(fragmenmt=FRAGMENT_STDINT_H, msg = 'Checking for stdint.h header', mandatory = False):
conf.define('INCLUDE_STDINT_H', 1)
def build(bld):
sources = bld.path.ant_glob([
'libogg/src/*.c'
])
includes = ['libogg/include/']
bld.stlib(
source = sources,
target = 'libogg',
features = 'c',
includes = includes,
export_includes = ['libogg/include/']
)

1
3rdparty/libvorbis/libvorbis vendored Submodule

@ -0,0 +1 @@
Subproject commit bb4047de4c05712bf1fd49b9584c360b8e4e0adf

View file

@ -96,6 +96,7 @@ SUBDIRS = [
Subproject('3rdparty/bzip2', lambda x: not x.env.DEDICATED and not x.env.HAVE_SYSTEM_BZ2),
Subproject('3rdparty/mainui', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/vgui_support', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/libogg', lambda x: not x.env.DEDICATED),
Subproject('3rdparty/MultiEmulator',lambda x: not x.env.DEDICATED),
# Subproject('3rdparty/freevgui', lambda x: not x.env.DEDICATED),
Subproject('stub/client', lambda x: not x.env.DEDICATED),