![]() Open /System/Library/Frameworks/ and drag AGL.framework, GL.framework, and amework into the Frameworks folder in Xcode. The first thing you should notice when you enter project is the missing frameworks. Now when you create a new project, under the OS X section there should be an Ogre category with "Mac OS X Application" that has the Ogre head logo. Getting the XCode 4 template Up and Runningĭownload the latest Xcode template by going to and downloading Ogre_Xcode4_Templates_ # NOTE that the build fails complaining that 'FindiOSSDK.cmake' can't be found, but I think we can ignore that.Īfter performing these steps, you should have a ~/ogre/build/sdk/ directory, which contains the files that you will need to use Ogre in your application. # make sure "Product > Scheme > ALL_BUILD" is selected # change "install" to Release Build Configuration # change "ALL_BUILD" to Release Build Configuration # Note, from browsing the forums, Xcode generator is essential as Makefiles don't work correctly (?) # OGRE_BUILD_SAMPLES=0 to disable building of the SampleBrowser for quicker compilation # OGRE_DEPENDENCIES_DIR is where the output of the previous step is at # Boost_DEBUG=1 is to make sure it is using the correct Boost location. # BOOST_ROOT, BOOST_INCLUDEDIR, BOOST_LIBRARYDIR indicate where our custom install of Boost is at. # below command is so long it probably takes 2 linesĬmake -D BOOST_ROOT=~/boost -D BOOST_INCLUDEDIR=~/boost -D BOOST_LIBRARYDIR=~/boost/stage/lib -D Boost_DEBUG=1 -D OGRE_DEPENDENCIES_DIR=~/ogredeps/build/ogredeps -D OGRE_STATIC=1 -D CMAKE_OSX_ARCHITECTURES=i386 -D OGRE_BUILD_SAMPLES=0 -G Xcode. # try to link to the boost libs in /opt/local/lib even though you explicitly specified a library location # if you have boost installed via MacPorts, de-activate it for now as the CMake boost finder is buggy and will # switch to latest stable branch at the time of this writing # this creates a directory ~/ogredeps/build/ogredeps, and this is where we will tell Ogre to look for dependencies # this seems to always compile in Release mode by default (i.e. Since we are building our own version of Boost, we might as well build the Ogre dependencies also.Ĭmake -D CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX10.8.sdk -D CMAKE_OSX_ARCHITECTURES=i386. NVIDIA Cg Download Building OGRE Dependencies In the terminal, do "cmake -version" to check that the version is at least 2.8.10.2Īlso pretty simple. Also install the command-line tools at the end. Go to their website, download CMake, and install. Since layout=version is specified, they have the suffix -xgcc42-mt-1_53 CMake ~/boost.build/bin/b2 -layout=versioned -build-type=minimal toolset=darwin link=static architecture=x86 address-model=32 stageĪfter following these steps, you have lots of *.a files in ~/boost/stage/lib. # this is important if you have Xcode 3 and Xcode 4 simulataneously installed ![]() # make sure you are using the latest compilers, and they refer to the ones inside /Applications/Xcode.app b2 install -prefix=/home/USERNAME/boost.build (NOTE that ~ doesn't work below to specify home) # install the b2 / bjam to ~/boost.build, this is like make and cmake, but for boost Mv boost_1_53_0 boost # I chose to do this so I don't have to update directories every time in other projects # Download Boost on the official website, at the time this was written, it is 1.53.0 Hopefully the negatives will eventually disappear in the future as compilers get better. However, you sacrifice compile times and binary sizes. My background is from using Visual Studio 2008, so I wanted a step-by-step guideįor simplicity, directories will be created in the home directory, although that may not be generally desirable.īecause of my requirements (32 bit only third party library), we will build a static version for i386 only, although it should be easy to identify and tweak those options for your own use.Īlthough not strictly necessary, Boost is nice for cross platform stuff, and I feel it makes me more productive. The motivation for this guide was the result of general frustration of the difficulty of building Ogre the Mac platform. Tested on a Mac mini 2011, if that matters. We will be using Xcode 4.6, and Mac OS X 10.7.5. This is an attempt to provide an up to date guide on how to build Ogre from scratch on a recent Mac platform. IMPORTANT: These instructions are meant to be used with old releases of Ogre.įor Ogre 1.10+, rather use BuildingOgre.md.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |