Building and packaging on OSX

(CMake)
(CMake)
Line 53: Line 53:
'''Building on 10.10 with 10.9 compat'''
'''Building on 10.10 with 10.9 compat'''
-
<code>cmake .. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DUSE_WIIUSE=0</code>
+
<code>cmake .. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk  -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9</code>
'''Building on 10.6'''
'''Building on 10.6'''

Revision as of 00:23, 20 March 2016

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.

Note : building on OSX 10.7 is a little more painful because the compiler provided by Apple wants really hard to make 64-bits binaries but the dependencies pack I provide is 32-bits for backwards compatibility. If you want to compile on 10.7, you will need to either convince the compiler to produce 32-bits binaries, either produce a 64-bits dependency pack

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


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 on 10.7, 10.8, 10.9

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

Building on 10.6 export CMAKE_OSX_ARCHITECTURES=i386 mkdir cmake_build cd cmake_build cmake .. make

Building on 10.6 with compatibility for 10.5 alternatively, to make a build backwards compatible with OSX 10.5 (this will likely need to be done from 10.6, I don't think making builds that far backwards compatible is possible under 10.7+) export CMAKE_OSX_ARCHITECTURES=i386 mkdir cmake_build cd cmake_build cmake .. -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk/ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.5 make


You can generate a Xcode project by replacing the "cmake .." line with "cmake .. -GXcode"

This is not recommended because Xcode needs much more space on the disk than CMake with make

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

User Tools