CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
IF(COMMAND CMAKE_POLICY)
  CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)


# Calling PROJECT() defines projectname_SOURCE_DIR and projectname_BINARY_DIR
PROJECT(SlicerBase)

INCLUDE(${Slicer3_CMAKE_DIR}/Slicer3QTBaseLibraryMacros.cmake)

INCLUDE_DIRECTORIES(
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/QTCore
  ${CMAKE_CURRENT_SOURCE_DIR}/QTBase
  ${CMAKE_CURRENT_BINARY_DIR}/QTCore
  )

ADD_SUBDIRECTORY(Logic)

IF(Slicer3_USE_QT)
  ADD_SUBDIRECTORY(QTBase)
  ADD_SUBDIRECTORY(QTCLI)
  ADD_SUBDIRECTORY(QTCoreModules)
  ADD_SUBDIRECTORY(QTCore)
  ADD_SUBDIRECTORY(QTGUI)
ENDIF(Slicer3_USE_QT)

IF (Slicer3_USE_KWWIDGETS)
  ADD_SUBDIRECTORY(GUI)
ENDIF (Slicer3_USE_KWWIDGETS)

ADD_SUBDIRECTORY(CLI)

IF(Slicer3_USE_PYTHONQT)
  ADD_SUBDIRECTORY(Python)
ENDIF(Slicer3_USE_PYTHONQT)
