Commit 047aef1e authored by Laurent Belcour's avatar Laurent Belcour

Updating the scons scripts.

Adding two aliases to the scons command: 'python' and 'tests'
Need to test those scripts on GNU/Linux and Windows. Validated on OSX.
parent 11b2c728
......@@ -43,7 +43,7 @@ vars.Add('PLUGIN_LIB', 'Special links for ALTA plugin')
vars.Add('EIGEN_INC', 'Eigen include directory (mandatory)')
vars.Add('PYTHON_INC', 'Python and boost-python include directory')
vars.Add('PYTHON_DIR', 'Python and boost-python libraries directory')
vars.Add('PYTHON_LIB', 'Python and boost-python libraries directory', default=[])
vars.Add('PYTHON_LIB', 'Python and boost-python libraries', default = [])
vars.Add('OPENEXR_INC', 'OpenEXR include directory', default=[])
vars.Add('OPENEXR_LIB', 'OpenEXR libraries', default = [])
vars.Add('OPENEXR_DIR', 'OpenEXR libraries directory',default=[])
......@@ -188,12 +188,16 @@ external = env.SConscript('external/SConscript')
core = env.SConscript('sources/core/SConscript')
plugins = env.SConscript('sources/plugins/SConscript')
softs = env.SConscript('sources/softs/SConscript')
#python = env.SConscript('sources/python/SConscript')
#tests = env.SConscript('sources/tests/SConscript')
#env.SConscript(dirs=['sources/core', 'sources/softs', 'sources/plugins'])
if 'python' in COMMAND_LINE_TARGETS:
python = env.SConscript('sources/python/SConscript')
env.Depends(python, core)
if 'tests' in COMMAND_LINE_TARGETS:
tests = env.SConscript('sources/tests/SConscript')
env.Depends(tests, core)
env.Depends(plugins, core)
env.Depends(softs, core)
#env.Depends(python, core)
#env.Depends(tests, core)
#env.NoClean(external)
......@@ -23,7 +23,7 @@ if library_available(env, pkgspec='python-2.7',
if build_lib:
env.Prepend(LIBS = ['core'])
env['SHLIBPREFIX']=''
env.SharedLibrary('../build/alta.so', ['alta.cpp'])
env.Alias('python', env.SharedLibrary('../build/alta.so', ['alta.cpp']))
else:
print "<<ERROR>> Unable to build the Python interface, please install boost-python"
print " or check your configuration."
......@@ -4,5 +4,5 @@ env = env.Clone()
env.Prepend(LIBS = ['core'])
env.AppendUnique(LIBS = ALTA_LIBS)
env.Program('./build/half-test-1', './params/half-test-1.cpp')
env.Program('./build/half-test-2', './params/half-test-2.cpp')
env.Alias('tests', env.Program('./build/half-test-1', './params/half-test-1.cpp'))
env.Alias('tests', env.Program('./build/half-test-2', './params/half-test-2.cpp'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment