project(csv2Plot)

cmake_minimum_required(VERSION 2.6)

find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})

# qcustomplot is required
set(TOOL_QCUSTOMPLOT TRUE CACHE BOOL "Required by tool csv2Plot" FORCE )

include_directories(	${CMAKE_CURRENT_SOURCE_DIR}
			${CMAKE_CURRENT_BINARY_DIR}
			${CAMITK_INCLUDE_DIR}
			${CAMITK_INCLUDE_DIR}/qcustomplot)

set(csv2Plot_LIBRARIES
  ${QT_LIBRARIES}
)

set(csv2Plot_MOC_SRCS
	plotWindow.h
)

set(csv2Plot_UIS
    plotWindow.ui)

qt4_wrap_ui(csv2Plot_UIS_H ${csv2Plot_UIS})
qt4_wrap_cpp(csv2Plot_MOC_UI ${csv2Plot_MOC_UI_H})
qt4_wrap_cpp(csv2Plot_MOCS ${csv2Plot_MOC_SRCS})


set(HEADERS
	  csv2Plot.h
	  ../csv2Sthing.h
	  ../../mml2Csv/dataMonitoredList.h
	  ${csv2Plot_UIS_H}
    )

set(SRCS
	  plotWindow.cpp
	  csv2Plot.cpp
	  ../csv2Sthing.cpp
	  ../../mml2Csv/dataMonitoredList.cpp
	  main.cpp
	  ${HEADERS}
	  ${csv2Plot_MOCS}
	  ${csv2Plot_MOC_UI}
)


link_directories(${csv2Plot_link})

add_executable(csv2Plot ${SRCS})

add_dependencies(csv2Plot qcustomplot)

target_link_libraries(csv2Plot qcustomplot ${csv2Plot_LIBRARIES})

add_library(csv2Plotgui SHARED ${SRCS})

add_custom_target(csv2PlotBin ALL)
