cmake_minimum_required(VERSION 2.4)

## INCLUDE( /usr/lib/IGSTK/IGSTKConfig.cmake )
## INCLUDE( /usr/lib/IGSTK/UseIGSTK.cmake )

#
# Find IGSTK
#
FIND_PACKAGE(IGSTK REQUIRED)
IF(IGSTK_FOUND)
  INCLUDE(${IGSTK_USE_FILE})
ENDIF(IGSTK_FOUND)
#  MESSAGE( FATAL_ERROR "This application requires IGSTK. One of these components is missing. Please verify configuration")
#ENDIF (IGSTK_FOUND)


#
# FIND ITK
#
FIND_PACKAGE(ITK REQUIRED)
IF (ITK_FOUND)
  INCLUDE (${USE_ITK_FILE})
ELSE (ITK_FOUND)
  MESSAGE( FATAL_ERROR "This application requires ITK. One of these components is missing. Please verify configuration")
ENDIF (ITK_FOUND)


#
# FIND VTK
#
FIND_PACKAGE(VTK REQUIRED)
IF (VTK_FOUND)
  INCLUDE (${USE_VTK_FILE})
ELSE (VTK_FOUND)
  MESSAGE( FATAL_ERROR "This application requires VTK. One of these components is missing. Please verify configuration")
ENDIF (VTK_FOUND)


#
# FIND FLTK
#
FIND_PACKAGE(FLTK)
  IF (FLTK_FOUND)
    INCLUDE_DIRECTORIES (${FLTK_INCLUDE_DIR})
    IF(WIN32)
      ADD_DEFINITIONS(-DWIN32)
    ENDIF(WIN32)
    LINK_LIBRARIES( ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} )
    IF(CYGWIN)
      LINK_LIBRARIES( ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32)
    ENDIF(CYGWIN)
  ELSE (FLTK_FOUND)
    MESSAGE( FATAL_ERROR "This application requires FLTK. One of these components is missing. Please verify configuration")
  ENDIF (FLTK_FOUND)

#
# Examples that do not require GUI
#




#
# Examples that require FLTK
#

SUBDIRS(
    HelloWorld
    OneViewAndTracking
    FourViewsAndTracking
    )
