# The script is taken from http://code.google.com/p/nvidia-texture-tools/
#
# Try to find OpenEXR's libraries, and include path.
# Once done this will define:
#
# OPENEXR_FOUND = OpenEXR found.
# OPENEXR_INCLUDE_PATHS = OpenEXR include directories.
# OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
#
SET ( OPENEXR_LIBRARIES )
SET ( LIBRARY_PATHS
/ u s r / l i b
/ u s r / l o c a l / l i b
/ s w / l i b
/ o p t / l o c a l / l i b
$ E N V { P R O G R A M _ F I L E S } / O p e n E X R / l i b / s t a t i c )
FIND_PATH ( OPENEXR_INCLUDE_PATH ImfRgbaFile.h
P A T H _ S U F F I X E S O p e n E X R
/ u s r / i n c l u d e
/ u s r / l o c a l / i n c l u d e
/ s w / i n c l u d e
/ o p t / l o c a l / i n c l u d e )
FIND_LIBRARY ( OPENEXR_HALF_LIBRARY
N A M E S H a l f
P A T H S $ { L I B R A R Y _ P A T H S } )
FIND_LIBRARY ( OPENEXR_IEX_LIBRARY
N A M E S I e x
P A T H S $ { L I B R A R Y _ P A T H S } )
FIND_LIBRARY ( OPENEXR_IMATH_LIBRARY
N A M E S I m a t h
P A T H S $ { L I B R A R Y _ P A T H S } )
FIND_LIBRARY ( OPENEXR_ILMIMF_LIBRARY
N A M E S I l m I m f
P A T H S $ { L I B R A R Y _ P A T H S } )
IF ( OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY )
SET ( OPENEXR_FOUND TRUE )
SET ( OPENEXR_INCLUDE_PATHS ${ OPENEXR_INCLUDE_PATH } CACHE STRING "The include paths needed to use OpenEXR" )
SET ( OPENEXR_LIBRARIES ${ OPENEXR_IMATH_LIBRARY } ${ OPENEXR_ILMIMF_LIBRARY } ${ OPENEXR_IEX_LIBRARY } ${ OPENEXR_HALF_LIBRARY } opencv_zlib CACHE STRING "The libraries needed to use OpenEXR" )
ENDIF ( )
IF ( OPENEXR_FOUND )
IF ( NOT OPENEXR_FIND_QUIETLY )
MESSAGE ( STATUS "Found OpenEXR: ${OPENEXR_ILMIMF_LIBRARY}" )
ENDIF ( )
ELSE ( )
IF ( OPENEXR_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Could not find OpenEXR library" )
ENDIF ( )
ENDIF ( )
MARK_AS_ADVANCED (
O P E N E X R _ I N C L U D E _ P A T H S
O P E N E X R _ I L M I M F _ L I B R A R Y
O P E N E X R _ I M A T H _ L I B R A R Y
O P E N E X R _ I E X _ L I B R A R Y
O P E N E X R _ H A L F _ L I B R A R Y )