MESSAGE("Specialized FindGeoTiff Called")

if( NOT $ENV{GEOTIFF_LIBRARY} STREQUAL "" )
  SET(GEOTIFF_LIBRARY  $ENV{GEOTIFF_LIBRARY})

  if( NOT $ENV{GEOTIFF_INCLUDE_DIR} STREQUAL "" )
     SET(GEOTIFF_INCLUDE_DIR  $ENV{GEOTIFF_INCLUDE_DIR})
  else()
     SET(GEOS_INCLUDE_DIR "GeoTiffIncDir")
  endif()
  SET(GEOTIFF_INCLUDE_DIRS ${GEOTIFF_INCLUDE_DIR})
  SET(GEOTIFF_LIBRARYS ${GEOTIFF_LIBRARY})

  MARK_AS_ADVANCED(GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
  SET(GEOTIFF_FOUND TRUE)
  MESSAGE("FindGeoTIFF Set By Envionment")

else()
find_path(GEOTIFF_INCLUDE_DIR
   NAMES geotiff.h
   PATH_SUFFIXES libgeotiff geotiff)

find_library(GEOTIFF_LIBRARY
   NAMES geotiff geotiff3
   PATH_SUFFIXES geotiff )

set(GEOTIFF_INCLUDE_DIRS ${GEOTIFF_INCLUDE_DIR})
set(GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GEOTIFF DEFAULT_MSG GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
mark_as_advanced(GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
endif()