project(convertMmlGui)

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 convertMmlGUI" FORCE )

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

set(convertMmlGui_LIBRARIES
  ${QT_LIBRARIES}
)

set(CONVERTMMLGUI_MOC_SRCS
    convertMml.h
    help.h
    ../csv2Sthing/csv2Plot/plotWindow.h
)

set(CONVERTMMLGUI_UIS
    convertMml.ui
    help.ui
    ../csv2Sthing/csv2Plot/plotWindow.ui
)

set(CONVERTMMLGUI_RCC_SRCS
    convertMml.qrc)

qt4_wrap_ui(CONVERTMMLGUI_UIS_H ${CONVERTMMLGUI_UIS})
qt4_wrap_cpp(CONVERTMMLGUI_MOCS ${CONVERTMMLGUI_MOC_SRCS})
qt4_add_resources(CONVERTMMLGUI_RCC ${CONVERTMMLGUI_RCC_SRCS})


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

set(SRCS
	    convertMml.cpp
	    help.cpp
	    ../csv2Sthing/csv2StatsVal/csv2StatsVal.cpp
	    ../csv2Sthing/csv2Plot/plotWindow.cpp
	    ../csv2Sthing/csv2Sthing.cpp
	    ../mml2Csv/mml2Csv.cpp
	    ../mml2Csv/dataMonitoredList.cpp
	    ../csv2Sthing/csv2Plot/csv2Plot.cpp
	    ${HEADERS}
	    ${CONVERTMMLGUI_MOCS}
	    ${CONVERTMMLGUI_MOC_UI}
	    ${CONVERTMMLGUI_RCC}
    )


add_library(convertMmlguigui STATIC ${SRCS})

link_directories(${gui_link})

add_executable(convertMmlGui ${SRCS})

target_link_libraries(convertMmlGui monitoring qcustomplot ${convertMmlGui_LIBRARIES})

add_custom_target(convertMmlGuiBin ALL)

add_dependencies(convertMmlGui monitoring qcustomplot)
