Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 92 lines (67 sloc) 3.497 kb
e0df155 @opencollada-sebastian scons buils scripts for linux
opencollada-sebastian authored
1 import platform #Requiered to detect the current plattform
2
3
4 Decider('MD5-timestamp')
5
6
7 # define the variables the user can set on the command line
8 vars = Variables('custom.py')
9 vars.Add(BoolVariable('RELEASE', 'Set to build for release', 0))
10 vars.Add(BoolVariable('PG', 'Set to build with -pg set for gcc for profiling', 0))
11 vars.Add(BoolVariable('SHAREDLIB', 'Set to build shared libraries instead of static ones (untested).', 0))
e5ff75e @opencollada-sebastian fix SConscript/SConstruct files to allow setting the os lib path
opencollada-sebastian authored
12 vars.Add(EnumVariable('LIBDIRNAME', 'The name of the systems library directory, for linux use', 'lib/', allowed_values=('lib/', 'lib64/') ))
e0df155 @opencollada-sebastian scons buils scripts for linux
opencollada-sebastian authored
13 vars.Add(BoolVariable('PCRENATIVE',
14 """Set to build using the systems native pcre lib instead of the delivered lib. Uses same configuration dir for both configurations.
15 """, 1))
16 vars.Add(EnumVariable('XMLPARSER',
17 """Selects the xml parser to be used
18 libxml: Use libXML contained in OpenCOLLADA external sources
19 expat: Use expat contained in OpenCOLLADA external sources
20 libxmlNative: Use libXML deliverd with your OS. libXML and the corresponding development files need to be installed
21 expatNative: Use expat deliverd with your OS. expat and the corresponding development files need to be installed
22
23 """
24 , 'libxmlnative', allowed_values=('libxml', 'expat', 'libxmlnative', 'expatnative'), ignorecase=2))
25 vars.Add(BoolVariable('NOVALIDATION', 'Set to disable shema validation in sax frame work loader', 0))
26
27 env=Environment( variables=vars )
28 Help(vars.GenerateHelpText(env))
29
30 if env['RELEASE']:
31 configurationName = 'release'
32 env['CPPFLAGS'] = ' -O2 -DNDEBUG'
33 else:
34 configurationName = 'debug'
35 env['CPPFLAGS'] = ' -O0 -g3 -ggdb3 -fno-inline'
36
37 if env['PG']:
38 configurationName += 'Pg'
39 env['CPPFLAGS'] += ' -pg'
40
41 env['platformDir'] = env['PLATFORM'] + '/'
42 env['architectureDir'] = platform.machine() + '/'
43 env['configurationBaseName'] = env['platformDir'] + env['architectureDir'] + configurationName
44
45 if (env['XMLPARSER'] == 'expat') or (env['XMLPARSER'] == 'expatnative'):
46 env['xmlParserConfName'] = 'expat'
47 else:
48 env['xmlParserConfName'] = 'libxml'
49
50 if env['NOVALIDATION']:
51 env['validationConfName'] = 'Novalidation'
52 else:
53 env['validationConfName'] = ''
54
55 env['objDir'] = 'obj/'
e5ff75e @opencollada-sebastian fix SConscript/SConstruct files to allow setting the os lib path
opencollada-sebastian authored
56 env['libDir'] = env['LIBDIRNAME']
e0df155 @opencollada-sebastian scons buils scripts for linux
opencollada-sebastian authored
57 env['binDir'] = 'bin/'
58
59
3dc5013 @opencollada-sebastian fix build scripts to build with common libs (ftoa and buffer)
opencollada-sebastian authored
60 SConscript(['common/libftoa/SConscript'], exports = 'env')
61 SConscript(['common/libBuffer/SConscript'], exports = 'env')
e0df155 @opencollada-sebastian scons buils scripts for linux
opencollada-sebastian authored
62 SConscript(['COLLADABaseUtils/SConscript'], exports = 'env')
63 SConscript(['Externals/MathMLSolver/SConscript'], exports = 'env')
64 SConscript(['Externals/UTF/SConscript'], exports = 'env')
65 if not env['PCRENATIVE']:
66 SConscript(['Externals/pcre/SConscript'], exports = 'env')
67
68
69 if env['XMLPARSER'] == 'expat':
70 SConscript(['Externals/expat/SConscript'], exports = 'env')
71 elif env['XMLPARSER'] == 'libxml':
72 SConscript(['Externals/LibXML/SConscript'], exports = 'env')
73
74 SConscript(['COLLADAFramework/SConscript'], exports = 'env')
75
76 SConscript(['GeneratedSaxParser/SConscript'], exports = 'env')
77 SConscript(['COLLADASaxFrameworkLoader/SConscript'], exports = 'env')
78 SConscript(['COLLADAStreamWriter/SConscript'], exports = 'env')
79
80 SConscript(['COLLADAValidator/SConscript'], exports = 'env')
3dc5013 @opencollada-sebastian fix build scripts to build with common libs (ftoa and buffer)
opencollada-sebastian authored
81 SConscript(['dae2ogre/SConscript'], exports = 'env')
82
83
84 Help("""
85 The build process using scons allows you to set several options. All of the are
86 explained above. However, not all combinations have been tested and some of them
87 might not work. A list of teste combinations will be listed here in near future.
88 """)
e0df155 @opencollada-sebastian scons buils scripts for linux
opencollada-sebastian authored
89
90
91
Something went wrong with that request. Please try again.