forked from mdaus/nitro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
42 lines (33 loc) · 1.33 KB
/
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
import os
from build import CPPOptionsContext
from waflib import Scripting, Options
from waflib.Build import BuildContext
from waflib.Tools import waf_unit_test
APPNAME = 'nitro'
top = '.'
out = 'target'
TOOLS = 'build swig pythontool'
DIRS = 'externals modules'
def options(opt):
opt.load(TOOLS + ' msvs dumpenv', tooldir='build')
opt.add_option('--release', action='store_true', dest='release',
help='Configure release', default=False)
opt.recurse(DIRS)
def configure(conf):
conf.env['APPNAME'] = APPNAME
conf.load(TOOLS, tooldir='build')
if conf.env['COMPILER_CXX'] != 'msvc':
conf.env.CFLAGS += ['-Wall'];
conf.env.CXXFLAGS += ['-Wall'];
conf.recurse(DIRS)
def build(bld):
bld.launch_dir = os.path.join(bld.launch_dir, 'modules')
bld.recurse(DIRS)
dct = {'INSTALL':bld.env['PREFIX'], 'VERSION':bld.env['VERSION'], 'PLATFORM':bld.env['PLATFORM']}
bld(features='subst', dct=dct, source='utils/installer/nitro_installer.iss.in',
target=bld.path.find_or_declare('installer/nitro_installer.iss'), name='installer')
bld.install_files('target/installer', bld.path.ant_glob(['utils/installer/*.bmp','utils/installer/*.ico']))
bld.add_post_fun(waf_unit_test.summary)
def distclean(context):
context.recurse(DIRS)
Scripting.distclean(context)