From Simon Julier, "I ran across linking errors with osgdb_exr. Specifically, I found it was necessary to link against libImlIlf, libImlThread, libHalf, libIex and libzip.
I have attached a patch, against the trunk from 13:30 today, which consists of the following: 1. CMakeModules/FindOpenEXR.cmake: Look for libIlmThread and libIex as well. 2. src/osgPlugins/CMakeList.txt: Only include the exr subdirectory if both the OpenEXR and zip libraries were found. 3. src/osgPlugins/exr/CMakeLists.txt: Add ZIP_LIBRARY to TARGET_EXTERNAL_LIBRARIES."
This commit is contained in:
parent
6fb5387473
commit
d21009c323
@ -39,6 +39,39 @@ FIND_LIBRARY(OPENEXR_IlmIlf_LIBRARY
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENEXR_IlmThread_LIBRARY
|
||||
NAMES IlmThread
|
||||
PATHS
|
||||
$ENV{OPENEXR_DIR}/lib
|
||||
$ENV{OPENEXR_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(OPENEXR_Iex_LIBRARY
|
||||
NAMES Iex
|
||||
PATHS
|
||||
$ENV{OPENEXR_DIR}/lib
|
||||
$ENV{OPENEXR_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENEXR_Half_LIBRARY
|
||||
NAMES Half
|
||||
PATHS
|
||||
@ -56,10 +89,12 @@ FIND_LIBRARY(OPENEXR_Half_LIBRARY
|
||||
)
|
||||
|
||||
SET(OPENEXR_FOUND "NO")
|
||||
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_Half_LIBRARY)
|
||||
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
|
||||
SET(OPENEXR_LIBRARIES
|
||||
${OPENEXR_IlmIlf_LIBRARY}
|
||||
${OPENEXR_IlmThread_LIBRARY}
|
||||
${OPENEXR_Half_LIBRARY}
|
||||
${OPENEXR_Iex_LIBRARY}
|
||||
)
|
||||
SET(OPENEXR_FOUND "YES")
|
||||
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_Half_LIBRARY)
|
||||
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmIlf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
|
||||
|
@ -84,7 +84,7 @@ ENDIF()
|
||||
IF(JASPER_FOUND)
|
||||
ADD_SUBDIRECTORY(jp2)
|
||||
ENDIF()
|
||||
IF(OPENEXR_FOUND)
|
||||
IF(OPENEXR_FOUND AND ZLIB_FOUND)
|
||||
ADD_SUBDIRECTORY(exr)
|
||||
ENDIF()
|
||||
IF(GIFLIB_FOUND)
|
||||
|
@ -2,7 +2,7 @@ INCLUDE_DIRECTORIES( ${OPENEXR_INCLUDE_DIR}/OpenEXR )
|
||||
|
||||
SET(TARGET_SRC ReaderWriterEXR.cpp )
|
||||
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${OPENEXR_LIBRARIES} )
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${OPENEXR_LIBRARIES} ${ZLIB_LIBRARY} )
|
||||
|
||||
#### end var setup ###
|
||||
SETUP_PLUGIN(exr)
|
||||
|
Loading…
Reference in New Issue
Block a user