On ubuntu distributions, plugins and render systems are installed in /usr/lib/<x86_64-linux-gnu|i386-linux-gnu>/OGRE-<ogre version> and FindOGRE.cmake (Ogre 1.9.0) can't find both OGRE_PLUGIN_DIR_REL and OGRE_PLUGIN_DIR_DBG.
This can be easily fixed by adding a new path suffix in find_library command.
Old code:
Code: Select all
set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt Debug Debug/opt)
make_library_set(OGRE_${PLUGIN}_LIBRARY)
Code: Select all
set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE [u][color=#FF0000]OGRE-${OGRE_VERSION}[/color][/u] opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE [u][color=#FF0000]OGRE-${OGRE_VERSION}[/color][/u] opt Debug Debug/opt)
make_library_set(OGRE_${PLUGIN}_LIBRARY)
