From Ulrich Hertlien, "'m was getting a build failure from the OpenEXR reader on Mac OS X. It was complaining about undefined references to half::convert(int). I believe this is because the EXR plugin doesn't explicitly link against the Half library.

Attached is a modified FindOpenEXR.cmake module that locates IlmIlf and Half, as well as a modified exr/CMakeLists.txt that picks up this change.

Also attached are some typo fixes for CMakeModules.

Cheers,"
This commit is contained in:
Robert Osfield 2008-11-30 16:33:11 +00:00
parent 47f518d1c7
commit eba1072dfa
3 changed files with 35 additions and 15 deletions

View File

@ -1,14 +1,12 @@
# Locate gdal
# Locate libvncserver
# This module defines
# LIBVNCSERVER_LIBRARY
# LIBVNCSERVER_FOUND, if false, do not try to link to gdal
# LIBVNCSERVER_FOUND, if false, do not try to link to libvncserver
# LIBVNCSERVER_INCLUDE_DIR, where to find the headers
#
# $LIBVNCSERVER_DIR is an environment variable that would
# correspond to the ./configure --prefix=$LIBVNCSERVER_DIR
# used in building gdal.
#
# Created by Ulrich Hertlein.
# used in building libvncserver.
FIND_PATH(LIBVNCSERVER_INCLUDE_DIR rfb/rfb.h
$ENV{LIBVNCSERVER_DIR}/include

View File

@ -1,7 +1,7 @@
# Locate gdal
# Locate OpenEXR
# This module defines
# OPENEXR_LIBRARY
# OPENEXR_FOUND, if false, do not try to link to gdal
# OPENEXR_FOUND, if false, do not try to link to OpenEXR
# OPENEXR_INCLUDE_DIR, where to find the headers
#
# $OPENEXR_DIR is an environment variable that would
@ -27,7 +27,7 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
/usr/freeware/include
)
FIND_LIBRARY(OPENEXR_LIBRARY
FIND_LIBRARY(OPENEXR_IlmIlf_LIBRARY
NAMES IlmImf
PATHS
$ENV{OPENEXR_DIR}/lib
@ -47,9 +47,31 @@ FIND_LIBRARY(OPENEXR_LIBRARY
/usr/freeware/lib64
)
FIND_LIBRARY(OPENEXR_Half_LIBRARY
NAMES Half
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)
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_Half_LIBRARY)
SET(OPENEXR_LIBRARIES
${OPENEXR_IlmIlf_LIBRARY}
${OPENEXR_Half_LIBRARY}
)
SET(OPENEXR_FOUND "YES")
ENDIF(OPENEXR_LIBRARY AND OPENEXR_INCLUDE_DIR)
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_Half_LIBRARY)

View File

@ -1,12 +1,12 @@
# Locate gdal
# Locate zlib
# This module defines
# ZLIB_LIBRARY
# ZLIB_FOUND, if false, do not try to link to gdal
# ZLIB_FOUND, if false, do not try to link to zlib
# ZLIB_INCLUDE_DIR, where to find the headers
#
# $ZLIB_DIR is an environment variable that would
# correspond to the ./configure --prefix=$ZLIB_DIR
# used in building gdal.
# used in building zlib.
#
# Created by Ulrich Hertlein.