Prerequisites        
prerequisites.jpg

What you need to build Ogre from source.

Introduction

This is a small check list of things you need to do before you're ready to build Ogre from source.

Image

Installing Dependencies

Option 1: Extract the dependencies into your Ogre source root. Precompiled archive containing PPC and i386 binaries compiled against the 10.4u SDK are available: OS X Dependencies (link is only valid for Ogre version 1.7). A larger selection of precompiled dependency packages including more recent updates and iOS packages can be browsed to from the ogre-dependencies-mac page.

Option 2: Install Ogre dependencies system-wide via MacPorts. Be forewarned if you intend to distribute binaries, you may have to jump through a few hoops to link against the static archives (.a) or extract the dynamic libraries and modify their install name (install_name_tool). However individual developers may find this easier to manage on their local machines for general development.
sudo port install libpng +universal jpeg +universal libxml2 +universal
sudo port install pkgconfig xmlto autoconf automake libtool
sudo port install freetype +universal freeimage +universal libzzip +universal boost +universal ois +universal
sudo port install cmake

  • Ogre3D requires a 32 bit build due to use of Carbon interfaces via OIS. Thus the +universal specifications to ensure 32 and 64 bit builds for libraries.
  • You need the first line even if you already have libpng/jpeg/xml2 installed because they will be re-installed within the package system and we need to ensure universal build. You may need --enforce-variants if you have already installed these packages.
  • The second line is the build dependencies of libzzip, they do not need to be universal, but use +no_x11 +quartz to avoid unnecessary additional packages
Finally, from the terminal:
touch ~/.bash_profile
open -a TextEdit ~/.bash_profile

If it is not already present, add:
export CPPFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"

Finally, you need to install Cg and OIS. (Not strictly required by Ogre, but required for Demos, and generally recommended.)