Hi all, Trying to enable support for OpenEXR in OpenSG2, I stumbled over the following issues:
1) Setting OPENEXR_ROOT_DIR is not enough to find an OpenEXR installation in a non-standard location: Installing OpenEXR with a certain prefix creates the following directory layout: OPENEXR_ROOT_DIR/include OPENEXR_ROOT_DIR/include/OpenEXR OPENEXR_ROOT_DIR/lib ... The FindOpenEXR.cmake script, however, searches OPENEXR_ROOT_DIR/OpenEXR and OPENEXR_ROOT_DIR/lib/__OPENEXR_LIBDIR_SUFFIX. The patch includes the standard directories as well. 2) The FindOpenEXR.cmake script is distracted by globally installed OpenEXR libraries: In SLES 10, the OpenEXR package does not contain libIlmThread.so (which it seems is needed by OpenSG2 OpenEXR support). We cannot remove the OpenEXR-package due to package dependencies. Setting OPENEXR_ROOT_DIR does not help, because cmake always prefers system-libraries over the "PATHS" argument of FIND_LIBRARY. I think is a sound assumption that when OPENEXR_ROOT_DIR has been explicitly set by the user, he or she wants FindOpenEXR.cmake to ignore anything else. The patch sets the "NO_DEFAULT_PATH" argument to FIND_LIBRARY, when OPENEXR_ROOT_DIR has been set. Do you think the following patch can be incorporated in OpenSG2? Cheers, Johannes # diff CMake/FindOpenEXR.cmake-svn2382-original CMake/FindOpenEXR.cmake 1,2c1,2 < # - Find collada dom libraries < # Find the collada dom libraries and headers --- > # - Find OpenEXR libraries > > # Find the OpenEXR and ILM libraries and headers > 51a52 > "${OPENEXR_ROOT_DIR}/include/OpenEXR" > 58a60 > "${OPENEXR_ROOT_DIR}/lib" 59a62,65 > > # if OPENEXR_ROOT_DIR has been explicitly set, we don't want to search > default paths: > # i.e. the OPENEXR_ROOT_DIR should override system libraries > SET(__OPENEXR_NO_DEFAULT_DIRS NO_DEFAULT_PATH) 85c91,92 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 89c96,97 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 93c101,102 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 97c106,107 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 102c112,113 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 106c117,118 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 110c122,123 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) 114c127,128 < PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS}) --- > PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} > ${__OPENEXR_NO_DEFAULT_DIRS}) -- Johannes Zarl Virtual Reality Services Johannes Kepler University Informationsmanagement Altenbergerstrasze 69 4040 Linz, Austria Phone: +43 732 2468-8321 johannes.z...@jku.at http://vrc.zid.jku.at ------------------------------------------------------------------------------ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users