-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwscript
52 lines (36 loc) · 991 Bytes
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /usr/bin/env python
# encoding: utf-8
# mittorn, 2018
from waflib import Logs
import os
top = '.'
VGUI_SUPPORTED_OS = ['win32', 'darwin', 'linux']
def options(opt):
grp = opt.add_option_group('VGUI options')
grp.add_option('--disable-vgui', action = 'store_true', dest = 'NO_VGUI', default = False,
help = 'disable vgui_support [default: %(default)s]')
opt.load('vgui')
def configure(conf):
conf.env.NO_VGUI = conf.options.NO_VGUI
if conf.options.NO_VGUI:
return
conf.load('vgui')
conf.env.NO_VGUI = not conf.check_vgui()
def build(bld):
if bld.env.NO_VGUI:
return
libs = [ 'sdk_includes', 'werror' ]
# basic build: dedicated only, no dependencies
if bld.env.DEST_OS != 'win32':
libs += ['DL','M']
libs.append('VGUI')
source = bld.path.ant_glob(['*.cpp'])
includes = [ '.' ]
bld.shlib(
source = source,
target = 'vgui_support',
includes = includes,
use = libs,
rpath = bld.env.DEFAULT_RPATH,
install_path = bld.env.LIBDIR
)