Commit db0a754b authored by Pedro Lopes's avatar Pedro Lopes
Browse files

Update MacOSX cmake target and instructions

- Increased min version of mac os to 10.7 (using the corresponding framework)
- Use home-brew friendly paths
parent 58be5695
......@@ -48,6 +48,11 @@ Build
cmake -G "Visual Studio 10" ../cmake
### Mac OSX
cmake -G "Unix Makefiles" -DTARGET:STRING=macosx ../cmake
make
* Copy SDL.DLL and the roms subdirectory to the build directory.
* Right click the 'cannonball' project in the IDE and choose 'Set as StartUp project'.
* You can then compile, debug and run from Visual Studio as expected.
......
# Default CMake Setup. Used for Mac OS x builds
# For INTeL 32bit Mac OS X 10.5+
set(CMAKE_CXX_FLAGS " -O2 -force_cpusubtype_ALL -mmacosx-version-min=10.5 -arch i386 -m32 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -I/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include/ ")
set(CMAKE_CXX_FLAGS " -O2 -force_cpusubtype_ALL -arch i386 -m32 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7")
# # For PowerPC 32bit Mac OS X 10.5+
# set(CMAKE_CXX_FLAGS " -O2 -faltivec -force_cpusubtype_ALL -mmacosx-version-min=10.5 -arch ppc -m32 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -I/Developer/SDKs/MacOSX10.5.sdk/usr/X11R6/include/ ")
# set(CMAKE_CXX_FLAGS " -std=c++11 -stdlib=libstdc++ -O2 -faltivec -force_cpusubtype_ALL -mmacosx-version-min=10.5 -arch ppc -m32 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7")
# Use OpenGL for rendering
set(OPENGL 1)
# This is for MacPorts
set(lib_base /opt/local)
set(sdl_root ${lib_base})
# This is for Homebrew
set(lib_base /usr/local/Cellar)
set(sdl_root ${lib_base}/sdl/1.2.15)
include_directories("${sdl_root}/include/SDL/" "${lib_base}/include/" "/System/Library/Frameworks/" )
include_directories("${sdl_root}/include/SDL/" "${lib_base}/include/" "~/Library/Frameworks/SDL.framework/Headers" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include/" "${lib_base}/boost/1.60.0_1/include")
find_library(COCOA_LIBRARY Cocoa)
find_library(GLUT_LIBRARY GLUT )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment