cmake problems, no ogre dll, no OIS

mkultra333

08-12-2010 13:05:53

I've downloaded mygui 3.2.0 from svn. Trying to set it up with cmake but getting errors. Here's the options I've got set, I'm making the statically linked version.

I get this output.

Configuring MYGUI 3.2.0
ERROR compiled OGRE DLL's wasn't found
Looking for FREETYPE...
checking for module 'freetype2'
package 'freetype2' not found
Found FREETYPE: C:/GTK/lib/freetype.lib
Looking for OGRE
Using OGRE built from source (from specified path)
Looking for OIS...
checking for module 'OIS'
package 'OIS' not found
Could not locate OIS

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ freetype
+ ogre
+ Doxygen
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ OIS: Input library needed for the samples <http://sourceforge.net/projects/wgois>
-----------------------------------------------------------------------------

Configuring done


It can't find OGRE DLL's even though I've set the Ogre binary release folder. It also can't find OIS, I read that I have to manually set OGRE_SOURCE so I have, tried a couple of different settings but they made no difference.

What do I need to do?

Edit: Added...
OGRE_DIR C:/Ogre/ogre
...as a test but that didn't help.

Altren

08-12-2010 16:33:39

Set MYGUI_SAMPLES_INPUT to 2. And just copy Ogre dll's manually into bin/debug or bin/release folder, if you need to run demos and tools.

mkultra333

08-12-2010 17:23:30

Thanks, setting MYGUI_SAMPLES_INPUT to 2 fixed the OIS issue.

However the produced project won't compile. I set the configuration to Release.
It repeatedly says "fatal error C1083: Cannot open include file: 'OgreBuildSettings.h': No such file or directory"

Altren

08-12-2010 17:35:14

Set OGRE_BUILD to directory that you used as CMake build directory. I guess you used C:/Ogre/ogre.

mkultra333

08-12-2010 17:59:12

The directory I used as cmake build directory is "C:/Ogre/mygui". So I tried setting OGRE_BUILD to that too but I still get the same error.

Altren

08-12-2010 20:18:16

No, OGRE_BUILD is directory where Ogre was built via CMake.

mkultra333

09-12-2010 14:08:21

Tried setting OGRE_BUILD to c:/Ogre/ogre but I'm still getting the same compile error, can't find OgreBuildSettings.h

The actual path to OgreBuildSettings.h is C:\Ogre\ogre\include\OgreBuildSettings.h. I tried setting OGRE_BUILD to that too but it didn't work, same error.

My cmake settings are

mkultra333

10-12-2010 14:14:29

Gave up on that route. On a hunch, I deleted the version of mygui in c:/Ogre (which contains various version of Ogre and other projects) and started a new version in c:/Ogre/ogre (the actual folder that ogre 1.7 resides in.) At first it couldn't find any of the ogre headers, I added the C:\Ogre\ogre\OgreMain\include as a header search directory via VS9 "tools" menu and finally got it compiled.

Perhaps I'm the first person who tried to compile MyGUI outside of the same folder that houses the rest of ogre without making a bunch of alterations to the build environment. Looks a bit like there's something wrong with the cmake script if you aren't in the folder it expects. I probably shouldn't have had to add C:\Ogre\ogre\OgreMain\include as a VS9 search directory either.

Altren

10-12-2010 15:52:31

Well, I usually use out of source build (i.e. CMake build folder is not same as sources folder). It works fine, as well as build inside same directory, but you can delete this folder at any time and also able to have several different build configurations at same time (for example I have MyGUI+Ogre1.6, MyGUI+Ogre1.7, MyGUI3.0+Ogre1.7). Same for Ogre sources/build. So I'm sure that everything is fine with scripts if you use Ogre built through CMake and MyGUI.
Also I never add header search directory in VS (CMake handle all paths for me), because it usually cause troubles whenever you have more than one version of lib.

Also I updated MyGUI Compiling page. There was several missed parts there.

mkultra333

10-12-2010 16:05:17

Hmm, ok. Just wasn't working for me.

Also I never add header search directory in VS (CMake handle all paths for me), because it usually cause troubles whenever you have more than one version of lib.
Yeah, I thought this was undesirable, so I figured I'd do it just to compile mygui and then remove it.

Also I updated MyGUI Compiling page. There was several missed parts there.

One thing, it says the svn address is "https://my-gui.svn.sourceforge.net/svnroot/my-gui"; When I used that it started downloading a bunch of non-trunk stuff I figured I didn't need, so instead I used "https://my-gui.svn.sourceforge.net/svnroot/my-gui/trunk";

Altren

10-12-2010 16:16:36

Yeah, thanks, I'll fix that.