#CMake configuration file
cmake_minimum_required(VERSION 2.6)
#project name 
project(OCTTOOL)
set(CMAKE_CXX_FLAGS "-g -Wall")
include_directories(${OCTTOOL_SOURCE_DIR})
include_directories("/usr/include/root/")
include_directories("/usr/local/include/flens/")
link_directories(${OCTTOOL_SOURCE_DIR})
link_directories("/usr/lib/root/")
link_directories("/usr/local/lib/")
# executable name and files
add_executable(example
dict2.cpp  ExpLog.cpp  octtool.cpp testoct.cxx
)


#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 ${OCTTOOL_SOURCE_DIR}/build_dict_cxx.sh
   VERBATIM
)


target_link_libraries(example
fftw3 gsl Cint lapack Core Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Net Physics Gui Geom RIO dl gslcblas m MathCore)

#building just a library. 
add_library(octtool
SHARED
ExpLog.cpp        
dict2.cpp   octtool.cpp
)
target_link_libraries(octtool
fftw3 gsl Cint lapack Core Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Net Physics Gui Geom RIO dl gslcblas m)




