Pie Noon
An open source project by FPL.
 All Classes Pages
Building for OS X

You can use cmake to generate an Xcode project for PieNoon on OS X.

Version Requirements

These are the minimum required versions for building PieNoon on OS X:

Before Building

  • Install Xquartz.
  • Reboot your machine. Rebooting sets the DISPLAY environment variable for Xquartz, which enables sample applications to run correctly.
  • Download the libwebp archive for OS X from WebP Precompiled Utilities.
  • Unpack cwebp to a directory on your system.
  • Add directory containing cwebp to the PATH variable.
    • For example, if cwebp is installed in /home/dev/cwebp the following line should be added to the user's bash resource file ~/.bashrc.
      export PATH="$PATH:/home/dev/cwebp/bin"
  • Install Ragel using package manager
    • e.g. brew install ragel
    • e.g. sudo port install ragel

Creating the Xcode project using cmake

The Xcode project is generated using cmake.

For example, the following generates the Xcode project in the pie_noon directory.

cd pie_noon
cmake -G "Xcode"

Building with Xcode

  • Double-click on pie_noon/pie_noon.xcodeproj to open the project in Xcode.
  • Select "Product-->Build" from the menu.

You can also build the game from the command-line.

  • Run xcodebuild after generating the Xcode project to build all targets.
  • You may need to force the generated_includes target to be built first.

For example, in the pie_noon directory:

xcodebuild -target generated_includes
xcodebuild

Executing the Game

  • Select "pie_noon" in Scheme, for example "pie_noon-->My Mac 64-bit", from the combo box to the right of the "Run" button.
  • Click the "Run" button.