From 3853ff5435f0bedea024dbc40e72ff5868b978aa Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 10 Sep 2022 20:56:51 +0300 Subject: [PATCH] 3rdparty: gl4es: add wscript to build --- 3rdparty/gl4es/wscript | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 3rdparty/gl4es/wscript diff --git a/3rdparty/gl4es/wscript b/3rdparty/gl4es/wscript new file mode 100644 index 00000000..cad76650 --- /dev/null +++ b/3rdparty/gl4es/wscript @@ -0,0 +1,24 @@ +#! /usr/bin/env python +# encoding: utf-8 + +import os + +def options(opt): + pass + +def configure(conf): + if not conf.path.find_dir('gl4es') or not conf.path.find_dir('gl4es/src'): + conf.fatal('Can\'t find gl4es submodule. Run `git submodule update --init --recursive`.') + return + +def build(bld): + gl4es_srcdir = bld.path.find_node('gl4es/src') + + bld.stlib(source = gl4es_srcdir.ant_glob(['gl/*.c', 'gl/*/*.c', 'glx/hardext.c']), + target = 'gl4es', + features = 'c', + includes = ['gl4es/src', 'gl4es/src/gl', 'gl4es/src/glx', 'gl4es/include'], + defines = ['NOX11', 'NO_GBM', 'NO_INIT_CONSTRUCTOR', 'DEFAULT_ES=2', 'NOEGL', 'EXTERNAL_GETPROCADDRESS=GL4ES_GetProcAddress', 'NO_LOADER', 'STATICLIB'], + cflags = ['-w', '-fvisibility=hidden', '-std=gnu99'], + subsystem = bld.env.MSVC_SUBSYSTEM, + export_includes = '.')