Installing/compiling OgreProcedural for iOS


17-04-2013 15:05:53

Hi there,

I've been trying to compile OgreProcedural (checkout of hg repo) for iOS for a couple of hours without any luck. Goal is to get OgreProcedural working on iOS in my existing Ogre project in Xcode.

Following this howto and similar instructions found while googling always result in the following error:

Could not locate OGRE
CMake Error at CMake/Utils/FindPkgMacros.cmake:117 (message):
Required library OGRE not found! Install the library (including dev
packages) and try again. If the library is already installed, set the
missing variables manually in cmake.

I've downloaded the latest iOS compiled OgreSDK and put it in /Users/martijn/zazzy/tools/OgreSDK. OGRE_HOME is set to that path (using the CMake GUI, which apparently exists, or as bash environment variable, or with set() within CMakeLists.txt).

Does anyone know what's wrong? Can anyone write a simple howto on compiling OgreProcedurial for iOS in Xcode?


18-04-2013 09:10:30


Is your Ogre SDK compiled as a static library?
I don't know too much about iOS version, but static is the default option for android..

So, Ogre needs the CMake variable OGRE_STATIC set to true..

Tell me if it works for you, if so, I'll update the doc :)


18-04-2013 13:25:37

Same error.. It is the default pre-compiled SDK for iOS, downloaded from this website.


18-04-2013 14:31:34

Unfortunately, I don't have any OSX machine to reproduce and debug...
But OgreProcedural makes a standard use of FindOgre.cmake, there's nothing specific about it.

It just callsfind_package(OGRE REQUIRED) and expects it to work, based on environnement..

So maybe asking for help on the 'mobile devices' forum would bring you some help? :)

Sorry I can't be more helpful on this.. :?


22-04-2013 13:05:35

The problem seems to have been a particular combination of the new Xcode and an older cmake version.

It compiles now after updating Xcode (Apple update), command line tools (via Xcode), and cmake (Mac ports) with:

mkdir build && cd build


22-04-2013 23:57:13

Apparently, that doesn't do the trick: configuration is successfully build, but Xcode starts compiling for OSX, not iOS. That is, 'OGRE_PLATFORM' is set to 'OGRE_PLATFORM_APPLE' instead of 'OGRE_PLATFORM_APPLE_IOS', resulting in errors on finding the right Ogre OSX header files. Setting 'Supported Platforms' to iOS manually apparently isn't enough.

Am I missing Cmake variables settings? Or is there an easy way within Xcode to set everything necessary to compile OgreProcedural for iOS?


24-04-2013 13:02:01

Just doing some guesswork here : is your baseSDK correctly configured?
From what I read, there's a CMAKE_OSX_SYSROOT property to be set...

In OgrePlatform.h, there's this definition:
# else
# endif

So, if OGRE_PLATFORM is wrong, it's probably because the wrong sdk is used..


25-04-2013 13:31:29

The Ogre SDK is the pre-compiled iOS version, nothing to configure for that.

Somehow, cmake should be able to configure everything (including Ogre headers) so that everything gets compiled for iOS, right? Question is what are the settings for that.