FIND_PATH(LIBJPEG_H NAMES jpeglib.h)
FIND_LIBRARY(LIBJPEG_LIB NAMES jpeg libjpeg jpeglib)

IF(LIBJPEG_H AND LIBJPEG_LIB)
	SET(LIBJPEG_FOUND TRUE CACHE BOOL Was libjpeg found)
ELSE(LIBJPEG_H AND LIBJPEG_LIB)
	SET(LIBJPEG_FOUND FALSE CACHE BOOL Was libjpeg found)
ENDIF(LIBJPEG_H AND LIBJPEG_LIB)

