# Qt4
FIND_PACKAGE(Qt4 REQUIRED)
IF(QT4_FOUND)
	INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
	INCLUDE(${QT_USE_FILE})	
ELSE()
	MESSAGE(FATAL_ERROR "QT4 not found, but needed.")
ENDIF(QT4_FOUND)

# ITK
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
	INCLUDE_DIRECTORIES(${ITK_INCLUDE_DIRS})
	INCLUDE(${ITK_USE_FILE})
ELSE()
	MESSAGE(FATAL_ERROR "ITK not found, but needed.")
ENDIF(ITK_FOUND)



SET(RITK_HDRS
)

IF(WIN32)
  SET(RITK_RCS
    Resources/ritk.RES
  )
ENDIF(WIN32)


SET(RITK_SRCS
  ritkMain.cxx
)

# Project settings
# ================
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(${RITK_INCLUDE_DIRS})
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(RITK_EXECUTABLE ritk)
ADD_EXECUTABLE(	${RITK_EXECUTABLE}					 
	${RC_SRCS}
	${RITK_RCS}
	${RITK_HDRS}
	${RITK_SRCS} 
	${MOC_SRCS}
	${UI_HDRS}		
)
TARGET_LINK_LIBRARIES(${RITK_EXECUTABLE} ${RITK_LIBRARIES} )
SET_TARGET_PROPERTIES(${RITK_EXECUTABLE}  PROPERTIES DEBUG_POSTFIX "d")


# Installation
# ============
INSTALL(TARGETS ${RITK_EXECUTABLE} CONFIGURATIONS DEBUG
	RUNTIME DESTINATION	bin/debug
	LIBRARY DESTINATION	dev/lib/debug
	ARCHIVE DESTINATION	dev/lib/debug
)

INSTALL(TARGETS ${RITK_EXECUTABLE} CONFIGURATIONS RELEASE
	RUNTIME DESTINATION	bin/release
	LIBRARY DESTINATION	dev/lib/release
	ARCHIVE DESTINATION	dev/lib/release
)
