Commit c61e666e authored by Laurent Belcour's avatar Laurent Belcour

Configuration scripts for scons are working under OSX AFAIK.

parent 10560b87
......@@ -97,7 +97,7 @@ env.AppendUnique(CPPPATH = ['#sources'])
##l
Export('env')
#external = env.SConscript('external/SConscript')
external = env.SConscript('external/SConscript')
core = env.SConscript('sources/core/SConscript')
plugins = env.SConscript('sources/plugins/SConscript')
softs = env.SConscript('sources/softs/SConscript')
......
......@@ -19,8 +19,8 @@ env.AppendUnique(env['CORE_LIB'])
## on OSX, the shared libraries and the softwares cannot share vtables. This
## impact the use of dynamic_cast in shared libraries.
##
#if sys.platform == 'darwin':
# env.AppendUnique(CCFLAGS = '-fvisibility=hidden')
if sys.platform == 'darwin':
env.AppendUnique(CCFLAGS = '-fvisibility=hidden')
#end
env.StaticLibrary('../build/core', sources)
# Building data plugins
# # Building data plugins
SConscript('data_merl/SConscript')
SConscript('data_brdf_slice/SConscript')
SConscript('data_interpolant/SConscript')
# Building nonlinear fitters
# # Building nonlinear fitters
SConscript('nonlinear_fitter_ceres/SConscript')
SConscript('nonlinear_fitter_nlopt/SConscript')
SConscript('nonlinear_fitter_ipopt/SConscript')
......@@ -19,7 +19,7 @@ SConscript('nonlinear_function_isotropic_lafortune/SConscript')
# Building nonlinear masking functions
SConscript('nonlinear_shadowing_smith/SConscript')
# Building rational fitters
# # Building rational fitters
SConscript('rational_fitter_eigen/SConscript')
SConscript('rational_fitter_leastsquare/SConscript')
SConscript('rational_fitter_quadprog/SConscript')
......@@ -27,7 +27,7 @@ SConscript('rational_fitter_parallel/SConscript')
SConscript('rational_fitter_matlab/SConscript')
# Building rational functions
# # Building rational functions
SConscript('rational_function_legendre/SConscript')
SConscript('rational_function_chebychev/SConscript')
SConscript('rational_function_chebychev_opt/SConscript')
......
Import('env')
env = env.Clone()
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['OPENEXR_LIB'])
env.AppendUnique(LIBPATH = env['OPENEXR_DIR'])
env.AppendUnique(CPPPATH = env['OPENEXR_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLib(env['OPENEXR_LIB']):
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['OPENEXR_LIB'])
env.AppendUnique(LIBPATH = env['OPENEXR_DIR'])
env.AppendUnique(CPPPATH = env['OPENEXR_INC'])
sources = ['data.cpp']
env.SharedLibrary('../../build/data_brdf_slice', sources)
build_lib = True
#end
env = conf.Finish()
sources = ['data.cpp']
env.SharedLibrary('../../build/data_brdf_slice', sources)
Import('env')
env = env.Clone()
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['FLANN_LIB'])
env.AppendUnique(LIBPATH = env['FLANN_DIR'])
env.AppendUnique(CPPPATH = env['FLANN_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLibWithHeader(env['FLANN_LIB'], 'flann/flann.hpp', 'CXX'):
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['FLANN_LIB'])
env.AppendUnique(LIBPATH = env['FLANN_DIR'])
env.AppendUnique(CPPPATH = env['FLANN_INC'])
sources = ['data.cpp']
env.SharedLibrary('../../build/data_interpolant', sources)
build_lib = True
#end
env = conf.Finish()
if build_lib:
sources = ['data.cpp']
env.SharedLibrary('../../build/data_interpolant', sources)
#end
\ No newline at end of file
......@@ -6,6 +6,8 @@ env.AppendUnique(LIBS = env['CERES_LIB'])
env.AppendUnique(LIBPATH = env['CERES_DIR'])
env.AppendUnique(CPPPATH = env['CERES_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLibWithHeader(env['CERES_LIB'], 'ceres/ceres.h', 'c++'):
......@@ -14,9 +16,12 @@ if conf.CheckLibWithHeader(env['CERES_LIB'], 'ceres/ceres.h', 'c++'):
env.AppendUnique(LIBS = env['CERES_OPT_LIB'])
#end
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_ceres', sources)
build_lib = True
#end
env = conf.Finish()
if build_lib:
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_ceres', sources)
#end
\ No newline at end of file
......@@ -3,13 +3,18 @@ env = env.Clone()
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
build_lib = False
conf = Configure(env)
if conf.CheckCXXHeader('unsupported/Eigen/LevenbergMarquardt'):
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_eigen', sources)
build_lib = True
#end
env = conf.Finish()
if build_lib:
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_eigen', sources)
#end
\ No newline at end of file
Import('env')
env = env.Clone()
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['IPOPT_LIB'])
env.AppendUnique(LIBPATH = env['IPOPT_DIR'])
env.AppendUnique(CPPPATH = env['IPOPT_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLib(env['IPOPT_LIB']):
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['IPOPT_LIB'])
env.AppendUnique(LIBPATH = env['IPOPT_DIR'])
env.AppendUnique(CPPPATH = env['IPOPT_INC'])
if conf.CheckLib(env['IPOPT_OPT_LIB']):
env.AppendUnique(LIBS = env['IPOPT_OPT_LIB'])
#end
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_ipopt', sources)
build_lib = True
#end
env = conf.Finish()
env = conf.Finish()
\ No newline at end of file
if build_lib:
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_ipopt', sources)
#end
\ No newline at end of file
Import('env')
env = env.Clone()
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['NLOPT_LIB'])
env.AppendUnique(LIBPATH = env['NLOPT_DIR'])
env.AppendUnique(CPPPATH = env['NLOPT_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLib(env['NLOPT_LIB']):
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
env.AppendUnique(LIBS = env['NLOPT_LIB'])
env.AppendUnique(LIBPATH = env['NLOPT_DIR'])
env.AppendUnique(CPPPATH = env['NLOPT_INC'])
if conf.CheckLib(env['NLOPT_OPT_LIB']):
env.AppendUnique(LIBS = env['NLOPT_OPT_LIB'])
#end
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_nlopt', sources)
build_lib = True
#end
env = conf.Finish()
env = conf.Finish()
\ No newline at end of file
if build_lib:
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_nlopt', sources)
#end
\ No newline at end of file
Import('env')
env = env.Clone()
env.AppendUnique(CPPPATH = env['MATLAB_INC'])
env.AppendUnique(LIBPATH = env['MATLAB_DIR'])
env.AppendUnique(LIBS = env['MATLAB_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
build_lib = False
conf = Configure(env)
if conf.CheckLib(env['MATLAB_LIB']):
env.AppendUnique(CPPPATH = env['MATLAB_INC'])
env.AppendUnique(LIBPATH = env['MATLAB_DIR'])
env.AppendUnique(LIBS = env['MATLAB_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
build_lib = True
sources = ['rational_fitter.cpp']
env.SharedLibrary('../../build/rational_fitter_matlab', sources)
#end
conf.Finish()
if build_lib:
sources = ['rational_fitter.cpp']
env.SharedLibrary('../../build/rational_fitter_matlab', sources)
#end
\ No newline at end of file
Import('env')
env = env.Clone()
env.AppendUnique(CPPPATH = env['QUADPROG_INC'])
env.AppendUnique(LIBPATH = env['QUADPROG_DIR'])
env.AppendUnique(LIBS = env['QUADPROG_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
conf = Configure(env)
if conf.CheckLib(env['QUADPROG_LIB']):
build_lib = False
env.AppendUnique(CPPPATH = env['QUADPROG_INC'])
env.AppendUnique(LIBPATH = env['QUADPROG_DIR'])
env.AppendUnique(LIBS = env['QUADPROG_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
if conf.CheckLib(env['QUADPROG_LIB']):
env.AppendUnique(CCFLAGS = env['OPENMP_FLAG'])
if conf.CheckLib(env['OPENMP_LIB']):
env.AppendUnique(LIBS = env['OPENMP_LIB'])
#end
sources = ['rational_fitter.cpp']
env.SharedLibrary('../../build/rational_fitter_parallel', sources)
build_lib = True
#end
conf.Finish()
if build_lib:
sources = ['rational_fitter.cpp']
env.SharedLibrary('../../build/rational_fitter_parallel', sources)
\ No newline at end of file
Import('env')
env = env.Clone()
env.AppendUnique(CPPPATH = env['QUADPROG_INC'])
env.AppendUnique(LIBPATH = env['QUADPROG_DIR'])
env.AppendUnique(LIBS = env['QUADPROG_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
build_lib = False
conf = Configure(env)
if conf.CheckLib(env['QUADPROG_LIB']):
env.AppendUnique(CPPPATH = env['QUADPROG_INC'])
env.AppendUnique(LIBPATH = env['QUADPROG_DIR'])
env.AppendUnique(LIBS = env['QUADPROG_LIB'])
env.AppendUnique(LIBS = env['PLUGIN_LIB'])
sources = ['rational_fitter.cpp']
env.SharedLibrary('../../build/rational_fitter_quadprog', sources)
build_lib = True
#end
conf.Finish()
if build_lib:
sources = ['rational_fitter.cpp']
env.SharedLibrary('../../build/rational_fitter_quadprog', sources)
#end
\ No newline at end of file
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