#File Generated by Hans J. Johnson
#Please contact hans-johnson@uiowa.edu for making enhancments/corrections
PROJECT(NIFTI)
# Configure Dart testing support.
INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)

SUBDIRS(znzlib niftilib)
ADD_DEFINITIONS(-DHAVE_ZLIB)


###  USE AS PART OF ITK
IF("${ITK_VERSION_MAJOR}" GREATER 0.0)
#   MESSAGE(STATUS "---------------------ITK ZLIB  ${ITK_ZLIB_LIBRARIES}")
  SET(PACKAGE_PREFIX "ITK")
  SET(LIB_INSTALL_DIR "/lib/InsightToolkit")
  SET(INCLUDE_INSTALL_DIR "/include/InsightToolkit")
  SET(NIFTI_ZLIB_LIBRARIES ${ITK_ZLIB_LIBRARIES})
ELSE("${ITK_VERSION_MAJOR}" GREATER 0.0)
###  USE AS STAND ALONE PACKAGE
   FIND_PACKAGE(ZLIB)
#  MESSAGE(STATUS "---------------------SYSTEM ZLIB ${ZLIB_LIBRARY}")
  SET(NIFTI_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
  SET(PACKAGE_PREFIX "")
  SET(LIB_INSTALL_DIR "/lib")
  SET(INCLUDE_INSTALL_DIR "/include")

  #Needs an if clause and more work before testing can take place.
  SUBDIRS(Testing utils fsliolib examples)
  ENABLE_TESTING()
ENDIF("${ITK_VERSION_MAJOR}" GREATER 0.0)
