Commit 29ee20bf authored by Laurent Belcour's avatar Laurent Belcour

Updating configurations files. Adding windows configuration file for scons....

Updating configurations files. Adding windows configuration file for scons. Changing the Timer to include OSX dependant code.
parent 8d31f233
......@@ -103,4 +103,6 @@ plugins = env.SConscript('sources/plugins/SConscript')
softs = env.SConscript('sources/softs/SConscript')
#env.SConscript(dirs=['sources/core', 'sources/softs', 'sources/plugins'])
env.Depends(plugins, core)
env.Depends(softs, core)
#env.NoClean(external)
......@@ -4,6 +4,6 @@
# ${ALTA}/external/quadprog++ directory provided with the ALTA
# library. You need to have the env variable ALTA defined.
CONFIG _+= quadprog
CONFIG += quadprog
INCLUDEPATH += $$(ALTA)/external/quadprog++
LIBS += -L$$(ALTA)/external/build/lib -lquadprog++
......@@ -89,4 +89,4 @@ IPOPT_OPT_LIB = []
##
MATLAB_INC = ['/Applications/MATLAB_R2014a.app/extern/include/']
MATLAB_DIR = ['/Applications/MATLAB_R2014a.app/bin/maci64/']
MATLAB_LIB = ['eng', 'mex','mat']
MATLAB_LIB = ['eng', 'mx','mat']
......@@ -18,7 +18,7 @@ LINKFLAGS = []
##
CORE_LIB = ['dl']
SOFT_LIB = ['core', 'dl']
PLUGINSLIB = ['core']
PLUGIN_LIB = ['core']
## OpenMP flags
......@@ -85,4 +85,4 @@ IPOPT_OPT_LIB = []
##
MATLAB_INC = ['/Applications/MATLAB_R2014a.app/extern/include/']
MATLAB_DIR = ['/Applications/MATLAB_R2014a.app/bin/maci64/']
MATLAB_LIB = ['eng', 'mex','mat']
MATLAB_LIB = ['eng', 'mx','mat']
import os, sys
##----------------------------------------------------------------##
## This file describes required and optional arguments to ALTA ##
## compilation. If you want to manualy tune the use of an already ##
## present library, uncomment the according lines. ##
##----------------------------------------------------------------##
## Compilators build flags
##
CXX = 'cl'
CCFLAGS = []
LINKFLAGS = []
## ALTA internal flags
##
CORE_LIB = []
SOFT_LIB = ['core']
PLUGIN_LIB = ['core']
## OpenMP flags
##
OPENMP_FLAG = []
OPENMP_LIB = []
## OpenEXR library
##
OPENEXR_INC = ['/usr/include/OpenEXR']
OPENEXR_DIR = ['/usr/lib']
OPENEXR_LIB = ['Half', 'IlmImf', 'IlmThread']
## FLANN library
##
FLANN_INC = ['/usr/include/flann']
FLANN_DIR = ['/usr/lib/x86_64_linux-gnu']
FLANN_LIB = ['flann']
## QUADPROG library
##
## You have to specify the directory of the QuadProg library
##
QUADPROG_INC = ['#external/quadprog++']
QUADPROG_DIR = ['#external/build/lib']
QUADPROG_LIB = ['quadprog++']
## CERES library
##
## You have to specify both the directory of the CERES library
## and the glog library
##
CERES_INC = ['#external/build/include']
CERES_DIR = ['#external/build/lib']
CERES_LIB = ['ceres', 'glog']
CERES_OPT_LIB = ['gomp', 'lapack', 'blas']
## NlOpt library
##
## You have to specify the directory of the NlOpt library
##
NLOPT_INC = ['#external/build/include']
NLOPT_DIR = ['#external/build/lib']
NLOPT_LIB = ['nlopt']
NLOPT_OPT_LIB = []
## coin IpOpt library
##
## You have to specify the directory of the IpOpt library
##
IPOPT_INC = ['#external/build/include']
IPOPT_DIR = ['#external/build/lib']
IPOPT_LIB = ['ipopt']
IPOPT_OPT_LIB = []
## MATLAB library and Engine
##
MATLAB_INC = ['/Applications/MATLAB_R2014a.app/extern/include/']
MATLAB_DIR = ['/Applications/MATLAB_R2014a.app/bin/maci64/']
MATLAB_LIB = ['eng', 'mex','mat']
......@@ -153,12 +153,17 @@ std::ostream& operator<<(std::ostream& out, const timer& t)
unsigned int timer::current_time() const
{
#ifdef _WIN32
#if defined(_WIN32)
SYSTEMTIME res;
GetSystemTime(&res);
return (unsigned int)(res.wSecond + res.wMinute*60 + res.wHour*360);
#else
time_t _t = time(NULL);
return (unsigned int)_t;
#elif defined(__APPLE__)
struct timespec _time;
gettimeofday(&_time, NULL);
return (unsigned int)_time.tv_sec;
#else
struct timespec _time;
clock_gettime(CLOCK_MONOTONIC, &_time);
return (unsigned int)_time.tv_sec;
#endif
}
......@@ -9,12 +9,14 @@ env.AppendUnique(CPPPATH = env['OPENEXR_INC'])
build_lib = False
conf = Configure(env)
if conf.CheckLib(env['OPENEXR_LIB']):
if conf.CheckLibWithHeader(env['OPENEXR_LIB'], 'ImfRgbaFile.h', 'c++'):
build_lib = True
#end
env = conf.Finish()
sources = ['data.cpp']
env.SharedLibrary('../../build/data_brdf_slice', sources)
if build_lib:
sources = ['data.cpp']
env.SharedLibrary('../../build/data_brdf_slice', sources)
#end
......@@ -24,4 +24,4 @@ env = conf.Finish()
if build_lib:
sources = ['fitter.cpp']
env.SharedLibrary('../../build/nonlinear_fitter_ceres', sources)
#end
\ No newline at end of file
#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