Mac is a little different than the other systems. First, some of the required libraries and include files are packaged together in frameworks, which will require some different types of arguments for g++. Second, Mac Apps are actually directories called bundles that contain the executable and resources such as dynamic libraries. Dealing with the first issue in Eclipse is pretty easy. Dealing with the second requires a bit more effort.
Get Eclipse with CDT: You can find directions at: http://max.berger.name/howto/cdt/cdt.jsp. The next two steps have some notes concerning this setup. You will need Java to run eclipse, so you may want to download that as well.
Download the OGRE SDK. Extract it to some easy to remember directory e.g /Applications/GameDev/OgreSDK. This directory should contain a bin, lib, include directories among other things. For the rest of these instructions I will refer to this directory as /path/to/ogre.
IMPORTANT: I've provided some files to help create the Mac App Bundle. Create a folder in your Ogre SDK folder called mac. Download the two files from http://cs.gettysburg.edu/~cpresser/cs391/mac/ and save them to this directory. You should make sure that buildApp.sh is executable.
Build CEGUI. You may be fortunate enough that your download of CEGUI was built using the same version of Ogre that you downloaded, or you may have done your research and intentionally got versions tha match. This is probably the way to go. If you didn't however you have a little bit of work to do.
If your project will not use CEGUI, you can skip this step and then skip all of the steps that involve CEGUI in the instructions to build a project.
Get the CEGUI source code and decompress it in a directory like Ogre. I used /Applications/GameDev/CEGUI. Decompressing the archive produces another folder, so the full path to my CEGUI install will be /Applications/GameDev/CEGUI/CEGUI-0.7.5. For the rest of these instructions I will refer to it as /path/to/cegui.
Download the Mac dependencies archive from CEGUI and decompress it in /path/to/cegui. There should now be 2 more folders: "dependencies" and "__MACOSX".
In the finder open up /path/to/cegui/projects/Xcode
Double click on CEGUI.xcodeproj to open it in Xcode.
Once open, click on CEGUI (the first line) in Groups & Files to select it.
Click the Info icon.
In the Architectures section, select the most recent "Base SDK" in the list. I used "Mac OS X 10.6".
Remove all of the "Valid Architectures" except "i386".
Scroll down the page to the "Compiler Version" sections. Select the most recent version of GCC.
Scroll down to the "User-Defined" section.
Change "CEGUI_BOOST_PATH" to /path/to/ogre/boost_1_42. Make sure you have the correct version number in the path name.
Change "CEGUI_OGRE_SDK_PATH" to /path/to/ogre
Close the Info window.
Click "Build and Run"
Once this is done an application will pop up which you can quit.
Click the arrow next to "Targets" in the "Groups and Files" section of the window.
Right click on "CEGUIOgreRenderer" and select "Build CEGUIOgreRenderer"
Go back to the Finder in /path/to/cegui and create two folders: "Frameworks" and "Plugins".
Create a "Release" folder in both folders from the previous step.
Copy all of the files that end in ".framework" from projects/Xcode/build/Release to Frameworks/Release.
Copy all of the files that end in ".bundle" from projects/Xcode/build/Release to Plugins/Release.
Create a new empty C++ project in Eclipse. Give it a name and hit the "Next" button.
Click the "Advanced Settings..."
Click the "C/C++ Build" drop-down on the left.
Click Environment
At the top of the "Tool Settings" tab, select "[All Configurations]" in "Configuration:". You may need to scroll up, to see it.
Add two environment variables with the "Add..." button.
NAME=OGRE_HOME VALUE=/path/to/ogre NAME=CEGUI_HOME VALUE=/path/to/ceguiBe sure you replace the paths with the actual path where Ogre and CEGUI reside.
Click "Settings" under "C/C++ Build" on the left side of the window.
In the "Tool Settings" tab, click "Includes" under "GCC C++ Compiler"
Click the Add button icon (a document with a green plus sign on the right).
You will need to add the directories where the include files are for OGRE, CEGUI, OIS and boost. You can type exactly what appears below. Eclipse will use the variabl ${OGRE_HOME} here.
${OGRE_HOME}/include/OGRE
${OGRE_HOME}/include/OIS
${OGRE_HOME}/boost_1_42
${CEGUI_HOME}/Frameworks/Release/CEGUIBase.framework/Versions/A/Headers
Click "Miscellaneous" under GCC C++ Compiler.
In the "Other flags" text box append -arch i386 after the flags that are already there. Be sure to include a space between them.
Click "Libraries" under "MacOS X C++ Linker". In the section "Libraries (-l)" add the following names:
OIS OgreProperty OgrePaging OgreRTShaderSystem OgreTerrain
Add the library paths in the "Library search path (-L)" area.
${OGRE_HOME}/lib/Release
${OGRE_HOME}/lib
Click "Miscellaneous" under "MacOS X C++ Linker". In the "Linker flags" text box put the following, all on one line.
-arch i386 -F${OGRE_HOME}/lib/release -F${CEGUI_HOME}/Frameworks/Release -framework Ogre -framework OpenGL -framework IOKit -framework Carbon -framework Cocoa -framework CEGUIBase -framework CEGUIOgreRenderer
Now click the "Build Steps" button. In the "Command" text box under "Post-build steps" add the following:
${OGRE_HOME}/mac/buildApp.sh ${ProjName} -cegui
In the "Description" text box, add the sentence, "Create the Mac app bundle."
Click "Ok".
Click "Finish".
Create a src directory inside your project directory.
Copy all of the .cfg files from /path/to/ogre/bin main directory.
In eclipse, right click on your new project and select "Refresh".
Double click "resources.cfg" and change all of the "../../.." to "/path/to/ogre" without quotes.
Save "resources.cfg"
Download the four Tutorial files in http://cs.gettysburg.edu/~cpresser/cs391/base/ to your src directory.
In eclipse, right click on your new project and select "Refresh". You are now ready to edit your OGRE project. Make sure you build it (Hammer Icon) once before attempting to run it.
The next time you want to set up a project, right click on this project and Copy it. Paste it, give the new one a different name, delete the files in src and run "Clean..." from the "Project" menu for the new project. You won't have to enter in all of the new settings again.