Developer Getting Started: OSX Xcode - cxong/cdogs-sdl GitHub Wiki
Prerequisites
- Git client (GitHub for Mac)
- CMake
- Xcode
- SDL 2, SDL_mixer 2, SDL_image 2 (download and copy frameworks into
/Library/Frameworks, see the READMEs for more details OR use build/macosx/install-sdl2.sh script to do it) - protoc version 3.6 (https://github.com/protocolbuffers/protobuf)
python3 -m pip install protobuf
Clone repo: GitHub for Mac
Repo URL: https://github.com/cxong/cdogs-sdl.git
-
Click the "Clone in Desktop" button in the repo website.
-
You should now see the repo contents in
/Users/username/cdogs-sdl
Run CMake
-
Run CMake: for "Where is the source code:" and "Where to build the binaries:", input
/Users/username/cdogs-sdl -
Click "Configure", using Xcode as the generator; click Done
-
Click "Generate"; you should now see an Xcode project in
/Users/username/cdogs-sdl.
Xcode
-
Open
/Users/username/cdogs-sdl/cdogs-sdl.xcodeproj -
Set the
cdogs-sdlproject as the active scheme (32-bit or 64-bit as desired) -
Edit the
cdogs-sdlscheme (Product > Scheme > Edit Scheme), and set the Working Directory to/Users/username/cdogs-sdl/src -
Click the Run button to compile and run. You are ready to go!
If Xcode crashes when running
This is most likely due to SDL2 framework not being signed properly; Xcode will crash when encountering an unsigned framework. See this page for a workaround: http://stackoverflow.com/a/24559954/2038264








