SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
SET(CMAKE_SHARED_MODULE_PREFIX "")
SET(CMAKE_SHARED_MODULE_SUFFIX "")


# Find ITK.
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

# Find VTK
 FIND_PACKAGE(VTK)
  IF(VTK_FOUND)
    INCLUDE(${VTK_USE_FILE})
  ELSE(VTK_FOUND)
    MESSAGE(FATAL_ERROR
            "Cannot build InsightApplications without VTK.  Please set  
VTK_DIR.")
  ENDIF(VTK_FOUND)

# Find FLTK
FIND_PACKAGE(FLTK)
IF(FLTK_FOUND)
  INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ELSE(FLTK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without FLTK.  Please set FLTK_DIR.")
ENDIF(FLTK_FOUND)


PROJECT(mir)
INCLUDE_REGULAR_EXPRESSION("^.*$")

#if you don't want the full compiler output, remove the following line
SET(CMAKE_VERBOSE_MAKEFILE ON)

#add definitions, compiler switches, etc. -g (debug)
ADD_DEFINITIONS(-Wall -O2 -g)

#INCLUDE_DIRECTORIES(
#  /opt/wsi/InsightToolkit-2.2.0/Applications/InsightApplications-2.2.0/Auxiliary/FltkImageViewer
#  ${SOURCE_DIR}/FltkImageViewer
#  ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer
#  ${InsightApplications_SOURCE_DIR}/Auxiliary/ITKFlFileWriter
#)


#list all source files here
ADD_EXECUTABLE(mir 
	main.cpp 
	icp.cpp 
	guilandmarkregistration.cpp
	guilandregimplementation.cpp
	landmarkregistrator.cpp
	guiicp.cpp
	guiicpimplementation.cpp
	errorwindow.cpp
	guimain.cpp
	guimainimplementation.cpp
	miregistration.cpp
	guimi.cpp
	guimiimplementation.cpp
	momentregistrator.cpp
	guirigidregistration.cpp
	guirigidregimplementation.cpp
	rigidregistration.cpp
	guiaffineregistration.cpp
	guiaffineregimplementation.cpp
	affineregistration.cpp
)

#FLTK_WRAP_UI(mir guiICP.fl)

TARGET_LINK_LIBRARIES(mir 
	ITKAlgorithms
	ITKStatistics
	ITKIO
	ITKBasicFilters 
	ITKCommon
	fltk
	ITKFltkImageViewer
	vtkRendering 
	vtkIO 
)

#need to link to some other libraries ? just add them here
#TARGET_LINK_LIBRARIES(mir png jpeg)

