forked from openalea/lpy
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSConstruct
More file actions
40 lines (28 loc) · 1.08 KB
/
SConstruct
File metadata and controls
40 lines (28 loc) · 1.08 KB
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
# -*-python-*-
from openalea.sconsx import config, environ
import os
ALEASolution = config.ALEASolution
pj= os.path.join
name='pylsystems'
options = Variables(['../options.py', 'options.py'], ARGUMENTS )
options.Add(EnumVariable('QT_VERSION','Qt major version to use','4',allowed_values=('4','5')))
qt_env = Environment(options=options, tools=[])
qt_version = int(qt_env['QT_VERSION'])
tools = ['boost_python', 'vplants.plantgl','qt'+str(qt_version)]
env = ALEASolution(options, tools)
env.Append( CPPPATH = pj( '$build_includedir','lpy' ) )
# Build stage
prefix= env['build_prefix']
SConscript( pj(prefix,"src/cpp/SConscript"),
exports={"env":env} )
SConscript( pj(prefix,"src/wrapper/SConscript"),
exports={"env":env} )
Default("build")
standartprefix = 'build-scons'
if prefix != standartprefix:
if os.path.exists(standartprefix):
if os.path.isdir(standartprefix) and not os.path.islink(standartprefix):
import shutil
shutil.rmtree(standartprefix)
else: os.remove(standartprefix)
os.symlink(prefix, standartprefix)