FIND_PATH(GLPNG_INCLUDE_DIR GL/glpng.h)
FIND_LIBRARY(GLPNG_LIBRARY NAMES glpng) 

IF (GLPNG_INCLUDE_DIR AND GLPNG_LIBRARY)
   SET(GLPNG_FOUND TRUE)
ENDIF (GLPNG_INCLUDE_DIR AND GLPNG_LIBRARY)

IF (GLPNG_FOUND)
   IF (NOT GLPng_FIND_QUIETLY)
      MESSAGE(STATUS "Found glpng: ${GLPNG_LIBRARY}")
   ENDIF (NOT GLPng_FIND_QUIETLY)
ELSE (GLPNG_FOUND)
   IF (GLPng_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find glpng")
   ENDIF (GLPng_FIND_REQUIRED)
ENDIF (GLPNG_FOUND)
