Skip to content

Commit

Permalink
Added searching for OpenEXR
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Nov 26, 2008
1 parent 51fee6f commit 89ea6d5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ FIND_PACKAGE(SDL)
FIND_PACKAGE(FOX)
FIND_PACKAGE(Inventor)
FIND_PACKAGE(Jasper)
FIND_PACKAGE(OpenEXR)
FIND_PACKAGE(COLLADA)
FIND_PACKAGE(Xine)
FIND_PACKAGE(OpenVRML)
Expand Down
55 changes: 55 additions & 0 deletions CMakeModules/FindOpenEXR.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Locate gdal
# This module defines
# OPENEXR_LIBRARY
# OPENEXR_FOUND, if false, do not try to link to gdal
# OPENEXR_INCLUDE_DIR, where to find the headers
#
# $OPENEXR_DIR is an environment variable that would
# correspond to the ./configure --prefix=$OPENEXR_DIR
#
# Created by Robert Osfield.

FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
$ENV{OPENEXR_DIR}/include
$ENV{OPENEXR_DIR}
$ENV{OSGDIR}/include
$ENV{OSGDIR}
$ENV{OSG_ROOT}/include
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
/usr/freeware/include
)

FIND_LIBRARY(OPENEXR_LIBRARY
NAMES IlmImf
PATHS
$ENV{OPENEXR_DIR}/lib
$ENV{OPENEXR_DIR}
$ENV{OSGDIR}/lib
$ENV{OSGDIR}
$ENV{OSG_ROOT}/lib
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
/usr/freeware/lib64
)

SET(OPENEXR_FOUND "NO")
IF(OPENEXR_LIBRARY AND OPENEXR_INCLUDE_DIR)
SET(OPENEXR_FOUND "YES")
ENDIF(OPENEXR_LIBRARY AND OPENEXR_INCLUDE_DIR)


0 comments on commit 89ea6d5

Please sign in to comment.