#CMake configuration file
cmake_minimum_required(VERSION 2.6)
#project name 
project(SVDREG)
set(CMAKE_CXX_FLAGS "-g -Wall")
include_directories(${SVDREG_SOURCE_DIR})
include_directories("/usr/include/root/")
include_directories("/usr/local/include/flens/")
link_directories(${SVDREG_SOURCE_DIR})
link_directories("/usr/lib/root/")
link_directories("/usr/local/lib/")
# executable name and files
add_executable(example
ExpLog.cpp            testsvdreg.cxx    
dict2.cpp   getVoltageForPot.cpp  polyfunc.cpp  svdreg.cpp
)


#command is called unfortunalty after after build
# if you change one of ExpLog.h bem.h LinkDef.h 
# rund bild twice. Or run manually the commands belwo.
add_custom_command(
   TARGET ALL
   COMMAND ${SVDREG_SOURCE_DIR}/build_dict_cxx.sh
   VERBATIM
)


target_link_libraries(example
Cint lapack Core Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Net Physics Gui Geom RIO dl flens blas m)

#building just a library. 
add_library(svdreg
SHARED
ExpLog.cpp        
dict2.cpp   getVoltageForPot.cpp  polyfunc.cpp  svdreg.cpp
)
target_link_libraries(svdreg 
Cint lapack Core Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Net Physics Gui Geom RIO dl flens blas m) 




