Commit f319c875 authored by Laurent Belcour's avatar Laurent Belcour
Browse files

Updating configuration files to allow specifying the Eigen dir.

Updating some of the Scons script.
parent 02f80536
......@@ -28,6 +28,10 @@ vars.Add('LINKFLAGS', 'Linker\'s flags')
vars.Add('CORE_LIB', 'Special links for ALTA core')
vars.Add('SOFT_LIB', 'Special links for ALTA soft')
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')
vars.Add('OPENEXR_INC', 'OpenEXR include directory')
vars.Add('OPENEXR_DIR', 'OpenEXR libraries directory')
vars.Add('OPENEXR_LIB', 'OpenEXR libraries')
......@@ -88,7 +92,7 @@ if env['CC'] in ['gcc', 'clang'] or env['CXX'] in ['g++', 'clang']:
env.AppendUnique(LIBPATH = ['#external/build/lib'])
env.AppendUnique(LIBPATH = ['#sources/build'])
env.AppendUnique(CPPPATH = ['#external/build/include'])
env.AppendUnique(CPPPATH = ['#external/build/include/Eigen'])
#env.AppendUnique(CPPPATH = ['#external/build/include/Eigen'])
env.AppendUnique(CPPPATH = ['#sources'])
......
......@@ -21,6 +21,18 @@ SOFT_LIB = ['core', 'rt', 'dl']
PLUGIN_LIB = ['core']
## Python and boost-python library
##
PYTHON_INC = ['/usr/include/python2.7']
PYTHON_DIR = []
PYTHON_LIB = ['boost_python', 'python2.7']
## Eigen library
##
EIGEN_INC = ['#external/build/include/Eigen']
## OpenMP flags
##
OPENMP_FLAG = ['-fopenmp']
......
......@@ -25,6 +25,18 @@ SOFT_LIB = ['core', 'dl', 'stdc++']
PLUGIN_LIB = ['core', 'stdc++']
## Python and boost-python library
##
PYTHON_INC = ['/opt/local/include', '/usr/include/python2.7']
PYTHON_DIR = ['/opt/local/lib']
PYTHON_LIB = ['boost_python-mt', 'python2.7']
## Eigen library
##
EIGEN_INC = ['#external/build/include/Eigen']
## OpenMP flags
##
OPENMP_FLAG = []
......
......@@ -21,6 +21,18 @@ SOFT_LIB = ['core', 'dl']
PLUGIN_LIB = ['core']
## Python and boost-python library
##
PYTHON_INC = ['/opt/local/include', '/usr/include/python2.7']
PYTHON_DIR = ['/opt/local/lib']
PYTHON_LIB = ['boost_python-mt', 'python2.7']
## Eigen library
##
EIGEN_INC = ['#external/build/include/Eigen']
## OpenMP flags
##
OPENMP_FLAG = ['-fopenmp']
......
......@@ -21,6 +21,18 @@ SOFT_LIB = ['core']
PLUGIN_LIB = ['core']
## Python and boost-python library
##
PYTHON_INC = ['/usr/include/python2.7']
PYTHON_DIR = []
PYTHON_LIB = ['boost_python', 'python2.7']
## Eigen library
##
EIGEN_INC = ['#external/build/include/Eigen']
## OpenMP flags
##
OPENMP_FLAG = ['/openmp']
......
......@@ -13,7 +13,8 @@ sources = ['common.cpp',
'vertical_segment.cpp']
# Special linking flags, defined in the OS dependant configuration file
env.AppendUnique(LIBS = env['CORE_LIB'])
env.AppendUnique(LIBS = env['CORE_LIB'])
env.AppendUnique(CPPPATH = env['EIGEN_INC'])
## Known compilation issue. If the core is not compiled with -fvisibility-hidden
## on OSX, the shared libraries and the softwares cannot share vtables. This
......
......@@ -7,7 +7,6 @@ env.AppendUnique(LIBPATH = env['OPENEXR_DIR'])
env.AppendUnique(CPPPATH = env['OPENEXR_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLibWithHeader(env['OPENEXR_LIB'], 'ImfRgbaFile.h', 'c++'):
......
env = Environment()
Import('env')
env = env.Clone()
env.Append(CPPPATH=['../../external/build/include'])
env.Append(CPPPATH=['../', '/usr/include/python2.7'])
env.Append(CPPPATH=['/opt/local/include'])
env.Append(LIBPATH=['../build'])
env.Append(LIBPATH=['/usr/lib/x86_64-gnu-linux'])
env.Append(LIBPATH=['/opt/local/lib'])
env.AppendUnique(CPPPATH = env['PYTHON_INC'])
env.AppendUnique(LIBPATH = env['PYTHON_DIR'])
env.AppendUnique(LIBS = env['PYTHON_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
conf = Configure(env)
boost_python_lib = ['boost_python-mt', 'python2.7']
build_lib = False
if conf.CheckLibWithHeader(boost_python_lib, 'boost/python.hpp', 'c++'):
if conf.CheckLib(env['PYTHON_LIB']):
env.Append(LIBS=['python2.7', boost_python_lib, 'core'])
#env.Append(LIBS=['python2.7', boost_python_lib, 'core'])
#env.Append(LIBS=['python2.7', 'boost_python-mt', 'core'])
env['SHLIBPREFIX']=''
build_lib = True
else:
print "<<ERROR>> Unable to build the Python interface, please install boost-python."
print "<<ERROR>> Unable to build the Python interface, please install boost-python"
print " or check your configuration."
#end
env = conf.Finish()
if build_lib:
env.SharedLibrary('alta.so', ['alta.cpp'])
env['SHLIBPREFIX']=''
env.SharedLibrary('../build/alta.so', ['alta.cpp'])
#end
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