Building and packaging on OSX

This page will explain how to build and packaged SuperTuxKart on mac OS X.


Please note that this is meant for developers and not casual users.

Also see Source control to obtain the source code from git.


Contents

Getting Started

sudo ln -s /System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/ /usr/local/include/GL (you might need to create /usr/local/include/ first if you never built and installed anything from source! sudo mkdir -p /usr/local/include/)


On OSX 10.9.5 I had to use (FIXME): $ xcrun --show-sdk-path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk $ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/ /usr/include $ sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Headers/ /usr/local/include/OpenGL The first link in order to find libcurl, the second to find opengl.

Dependencies


CMake

You can use the CMake build system to build STK. At this time CMake will not make a binary that is ready for distribution.

You'll have to run these commands inside your stk-code directory. The stk-assets directory has to be in the parent directory of stk-code

Building

With clang: mkdir cmake_build cd cmake_build cmake .. make


With GCC : mkdir cmake_build cd cmake_build cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc make

Building on 10.10 with 10.9 compat cmake .. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9

Xcode

1. Place an additional copy of the dependencies into Users/<YOUR_USERNAME>/Library/Frameworks
2. In terminal, use cd to navigate to your cloned stk-code directory
3. Execute the following commands:

mkdir xcode_build && cd xcode_build cmake .. -GXcode

4. Use Finder to navigate to your stk-code/xcode_build folder and open the newly generated Xcode project (SuperTuxKart.xcodeproj)
5. Build the project in Xcode: Product -> Build

Note: Xcode is much less well tested than makefiles, so there may be issues when trying to use Xcode.

Retrieved from "http://supertuxkart.sourceforge.net/Building_and_packaging_on_OSX"

User Tools