Commit 29871e4a authored by Laurent Belcour's avatar Laurent Belcour

Updating scons and python scripts.

parent 08b73e05
import os
import shutil
Import('env')
env = env.Clone()
if env.GetOption('clean'):
print "Nothing to do in external"
print "Removing all the third party packages"
# Removing the output build directory
shutil.rmtree('build', True)
# Removing the TP directories
shutil.rmtree('ceres-solver-1.7.0', True)
shutil.rmtree('eigen-eigen-ffa86ffb5570', True)
shutil.rmtree('glog-0.3.3', True)
shutil.rmtree('Ipopt-3.11.8', True)
shutil.rmtree('nlopt-2.4.1', True)
else:
##
# NlOpt dependancies
......@@ -26,14 +38,19 @@ else:
else:
execfile('obtain_ceres.py')
#end
print "<<INFO>> External libraries are compiled as shared librarie."
print "<<INFO>> Please update your environment variable before running ALTA commands."
##
# QuadProg++
##
qp_target = 'build' + os.sep + 'lib' + os.sep + 'quadprog++'
qp_base = 'quadprog++' + os.sep
qp_sources = [qp_base + 'Array.cc', qp_base + 'QuadProg++.cc']
env.Append(CPPPATH = ['build' + os.sep + 'include'])
env.StaticLibrary(target = qp_target, source = qp_sources)
#end
##
# QuadProg++
##
qp_target = 'build' + os.sep + 'lib' + os.sep + 'quadprog++'
qp_base = 'quadprog++' + os.sep
qp_sources = [qp_base + 'Array.cc', qp_base + 'QuadProg++.cc']
env.Append(CPPPATH = ['build' + os.sep + 'include'])
env.StaticLibrary(target = qp_target, source = qp_sources)
......@@ -15,7 +15,7 @@ if not os.path.exists('.' + os.sep + 'build' + os.sep + 'include' + os.sep + 'gl
obtain.patch('glog-0.3.3/src/glog/stl_logging.h.in', 'glog.patch')
#end
print '<<INSTALL>> configure and build GLOG v0.3.3'
obtain.configure_build('glog-0.3.3', '--enable-static=yes --enable-shared=false --with-pic=true')
obtain.configure_build('glog-0.3.3', '--enable-static=no --enable-shared=true --with-pic=true')
#end
else:
print '<<INSTALL>> GLOG already installed'
......@@ -50,14 +50,15 @@ if compile_test:
libname = ''
if os.name == 'posix':
libname = 'libglog.a'
libname = 'libglog.so'
elif os.name == 'nt':
libname = 'glog.lib'
else:
libname = 'libglog.dylib'
#end
cmake_cmd = 'cmake -DGLOG_LIB=' + build_dir + 'lib' + os.sep + libname + ' -DGLOG_INCLUDE=' + build_dir + 'include -DGFLAGS=OFF ' + '-DEIGEN_INCLUDE=' + build_dir + 'include -DCMAKE_INSTALL_PREFIX=' + build_dir + ' .' + ' -DDISABLE_TR1=ON -DBUILD_EXAMPLES=OFF ' + '-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DMINIGLOG=OFF'
#cmake_cmd = 'cmake -DGLOG_LIB=' + build_dir + 'lib' + os.sep + libname + ' -DGLOG_INCLUDE=' + build_dir + 'include -DGFLAGS=OFF ' + '-DEIGEN_INCLUDE=' + build_dir + 'include -DCMAKE_INSTALL_PREFIX=' + build_dir + ' .' + ' -DDISABLE_TR1=ON -DBUILD_EXAMPLES=OFF ' + '-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DMINIGLOG=OFF'
cmake_cmd = 'cmake -DBUILD_SHARED_LIBS=ON -DGLOG_LIB=' + build_dir + 'lib' + ' -DGLOG_INCLUDE=' + build_dir + 'include -DGFLAGS=OFF ' + '-DEIGEN_INCLUDE=' + build_dir + 'include -DCMAKE_INSTALL_PREFIX=' + build_dir + ' .' + ' -DDISABLE_TR1=ON -DBUILD_EXAMPLES=OFF ' + '-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DMINIGLOG=ON'
if os.name == 'nt':
ret = os.system(cmake_cmd + ' -G \"NMake Makefiles\"')
......
......@@ -12,7 +12,7 @@ if not os.path.exists('.' + os.sep + 'build' + os.sep + 'include' + os.sep + 'nl
print '<<WARNING>> no automatic installation for this package'
else:
print '<<INSTALL>> configure and build Nlopt v2.4.1'
obtain.configure_build('nlopt-2.4.1', '--without-matlab --without-octave --without-python --without-guile --with-pic=yes')
obtain.configure_build('nlopt-2.4.1', '--enable-static=no --enable-shared=true --without-matlab --without-octave --without-python --without-guile --with-pic=yes')
#end
else:
print '<<INSTALL>> NlOpt already installed'
......
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