# - Find TEEM
#
# Find the TEEM includes and libraries
# This module defines
#  TEEM_FOUND         - TRUE if found, FALSE otherwise
#  TEEM_INCLUDE_DIR   - Include directories for TEEM
#  TEEM_LIBRARIES     - The libraries to link against to use TEEM

FIND_PACKAGE(PackageHandleStandardArgs)

if (TEEM_INCLUDE_DIR AND TEEM_LIBRARIES)
  SET(TEEM_FIND_QUIETLY TRUE)
endif (TEEM_INCLUDE_DIR AND TEEM_LIBRARIES)

FIND_PATH(TEEM_INCLUDE_DIR
  NAMES
  teem/nrrd.h
  PATHS
  ${INCLUDE_INSTALL_DIR}
)

MARK_AS_ADVANCED(TEEM_INCLUDE_DIR)

FIND_LIBRARY(TEEM_LIBRARY NAMES teem PATHS ${LIB_INSTALL_DIR})

MARK_AS_ADVANCED(TEEM_LIBRARY)

IF( TEEM_LIBRARY )
  SET( FOUND_TEEM_LIBRARIES 1 )
ELSE( TEEM_LIBRARY )
  SET( FOUND_TEEM_LIBRARIES 0 )
ENDIF( TEEM_LIBRARY )

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TEEM DEFAULT_MSG TEEM_INCLUDE_DIR TEEM_LIBRARY)


