FindOgre.cmake doesn't find ogre

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

FindOgre.cmake doesn't find ogre

Postby mmixLinus » Sun Jan 27, 2019 23:29

(This is for v0-8 - 16th January 2019. CMake 3.9.4)
So I might be missing something obvious but after setting OGRE_H_BUILD_SETTINGS_PATH and OGRE_H_PATH I still run into ${OGRE_VERSION} being unset. This results in the error

Code: Select all

CMake Error at CMakeLists.txt:113 (if):
  if given arguments:

    "TRUE" "AND" "VERSION_GREATER" "1.11"

  Unknown arguments specified
the line in cegui_mk2\source\CMakeLists.txt:113 is

Code: Select all

if(${OGRE_FOUND} AND ${OGRE_VERSION} VERSION_GREATER 1.11)

After looking into cegui_mk2\source\cmake\FIndOgre.cmake I wonder if (line 252)
file (STRINGS "${OGRE_H_PATH}/OgrePrerequisites.h" _CEGUIOGREVERSIONDEFINES REGEX ".*#define OGRE_VERSION_.*[0-9]+")
shouldn't be
file (STRINGS "${OGRE_H_BUILD_SETTINGS_PATH}/OgreBuildSettings.h" _CEGUIOGREVERSIONDEFINES REGEX ".*#define OGRE_VERSION_.*[0-9]+")
because as far as I understand, the Ogre Version number is NOT in the Prerequisites header, right?

And after that nobody seems to put the MAJOR, MINOR and PATCH numbers together into a VERSION string, so I added the set line:

Code: Select all

    endforeach()
   set (OGRE_VERSION ${CEGUI_FOUND_OGRE_VERSION_MAJOR}.${CEGUI_FOUND_OGRE_VERSION_MINOR}.${CEGUI_FOUND_OGRE_VERSION_PATCH})
else()
which correctly sets OGRE_VERSION to 1.12.0 and CMake continues.
What have I missed to need these changes?
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: FindOgre.cmake doesn't find ogre

Postby Ident » Mon Jan 28, 2019 07:54

Is OGRE_VERSION not in OgrePrerequisites.h? I am pretty sure it used to be.
CrazyEddie: "I don't like GUIs"

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: FindOgre.cmake doesn't find ogre

Postby mmixLinus » Mon Jan 28, 2019 12:50

Yep, used to be, but not any longer I think.. Anyway, I'm asking over there.. :)
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: FindOgre.cmake doesn't find ogre

Postby mmixLinus » Tue Jan 29, 2019 10:23

I have a backward compatible fix for this (I tested with VERSION definitions in either Prerequesites.h or BuildSettings.h). Now I just need to create a Pull Request for it. I've never done that for CEGUI before, so bear with me please : ) Is it correct to create a fork on bitbucket?
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: FindOgre.cmake doesn't find ogre

Postby Ident » Tue Jan 29, 2019 20:43

CrazyEddie: "I don't like GUIs"

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 71
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: FindOgre.cmake doesn't find ogre

Postby mmixLinus » Thu Feb 07, 2019 10:14

On second thought.. Has anyone else had this problem (cegui 0.8.7 + ogre 1.11.5)? I wonder if I just had some initial setup problem..

I can make a PR out of this if anyone else is seeing this problem (ie., it actually exists).
MMiX.Me 3D Music Player
Galaxy Navigator 3D - 2 million stars (ESA's Gaia satellite)
(YouTube|Facebook)


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 13 guests