cmake_minimum_required(VERSION 2.6)

PROJECT(SegComp CXX)

FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})

FIND_PACKAGE(Qt4)
SET(QT_USE_QTDESIGNER ON)
INCLUDE(${QT_USE_FILE})
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
   
SET(SAMPLE_SRCS main.cxx mainWindow.cpp
itkDatImageIO.cxx itkDatImageIO.h itkDatImageIOFactory.cxx itkDatImageIOFactory.h
itkPGMImageIO.cxx itkPGMImageIO.h itkPGMImageIOFactory.cxx itkPGMImageIOFactory.h)
SET(SAMPLE_MOC_HDRS mainWindow.h)
SET(SAMPLE_UIS mainWindow.ui)

QT4_WRAP_UI( SAMPLE_UI_HDRS ${SAMPLE_UIS} )
QT4_WRAP_CPP( SAMPLE_MOC_SRCS ${SAMPLE_MOC_HDRS} )
  
ADD_EXECUTABLE(SegComp ${SAMPLE_SRCS} ${SAMPLE_MOC_HDRS} ${SAMPLE_MOC_SRCS} ${SAMPLE_RC_SRCS} ${SAMPLE_UI_HDRS})

TARGET_LINK_LIBRARIES(SegComp ${QT_LIBRARIES})
TARGET_LINK_LIBRARIES(SegComp ${ITK_LIBRARIES})
