# Try to find the EXIV2 lib and include files
#
# EXIV2_INCLUDE_DIR
# EXIV2_LIBRARIES
# EXIV2_FOUND

FIND_PATH( EXIV2_INCLUDE_DIR exiv2
  /usr/include
  /usr/local/include
)

FIND_LIBRARY( EXIV2_LIBRARY exiv2
  /usr/lib64
  /usr/lib
  /usr/local/lib
)

IF(EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)
  SET( EXIV2_FOUND TRUE )
  SET( EXIV2_LIBRARIES ${EXIV2_LIBRARY} )
ENDIF(EXIV2_INCLUDE_DIR AND EXIV2_LIBRARY)

IF(EXIV2_FOUND)
   IF(NOT EXIV2_FIND_QUIETLY)
      MESSAGE(STATUS "Found EXIV2: ${EXIV2_LIBRARY}")
   ENDIF(NOT EXIV2_FIND_QUIETLY)
ELSE(EXIV2_FOUND)
   IF(EXIV2_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find EXIV2")
   ENDIF(EXIV2_FIND_REQUIRED)
ENDIF(EXIV2_FOUND)

