Page 1 of 1

Little bug in FindOGRE.cmake on GNU/Linux(Ubuntu)

Posted: Mon Jun 09, 2014 7:28 pm
by romeoxbm
Hi everyone!
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)
New 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 [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)
This is a little fix and I don't think it worth a pull request, so if someone who has write rights could commit these changes... ;)

Re: Little bug in FindOGRE.cmake on GNU/Linux(Ubuntu)

Posted: Thu Jun 12, 2014 2:57 pm
by scrawl
Confirmed. Can you make a pull-request for this change?

Re: Little bug in FindOGRE.cmake on GNU/Linux(Ubuntu)

Posted: Wed Jun 18, 2014 9:26 am
by romeoxbm
I'm on it