Compile GZDoom on Mac OS X

From ZDoom Wiki
Jump to navigation Jump to search

This guide is for the compilation of GZDoom 3.7.0 and above (including the git dev builds).

Note: *this guide has been written with Homebrew in mind; if it's the first time for you, be very careful, as it can pollute the system if used improperly. This guide contains only the bare minimum needed.
Note: For builds above GZDoom 4.5.0, please follow this guide.

Compiling GZDoom on Mac OS X may seem like a daunting task, but it's actually pretty similar to the process for Linux.


  • A Mac computer supporting OpenGL 3.3 and above (a list is available here)
  • Mac OS X 10.11 El Capitan and above (it's possible to make the executable compatible with OS X 10.9 Mavericks)
  • Xcode 8 and above, the latest one is available here (requires free registration)
    • Xcode Command Line Tools, which contains the compilers and git tools
  • Homebrew (this must be installed after Xcode Command Line Tools)
  • CMake 2.8.7 or later, available here
  • libjpeg
  • FluidSynth, OpenAL-Soft, libsndfile and mpg123 (note that OpenAL-Soft is different from the OpenAL framework already provided by Apple, not compatible with GZDoom).

Install dependencies

In case you don't have Xcode Command Line Tools, this can be installed with this command line on the terminal:

xcode-select --install

For Homebrew, just follow the instructions at Install Homebrew section here.

To install the jpeg and sound packages, copy and paste the following to the terminal:

brew install jpeg-turbo fluid-synth openal-soft libsndfile mpg123

If in your Homebrew enviroment the package jpeg is already installed, then jpeg-turbo can be omitted, as it's equivalent.

Source code

It is recommended that you use a recent version from the Git repository to compile, but you may use an older version's source from the ZDoom Downloads Page if desired.

Configuring with CMake

When you run the CMake application, you will be greeted with a window asking for a source code path and a build directory. It is recommended that the build directory is created inside the source code.

After you click Configure, you will end up having to tell CMake where the sound libraries are located, so some options must be changed (you may need to switch to advanced view to see these options). First, disable DYN_OPENAL and click Configure again, then change the OPENAL_INCLUDE_DIR entry to /usr/local/opt/openal-soft/include/AL and the OPENAL_LIBRARY one to /usr/local/opt/openal-soft/lib/libopenal.dylib . Last step in case you need the compatibility with OSX 10.9: set CMAKE_OSX_DEPLOYMENT_TARGET to "10.9".

After all of this, click "Configure" one more time and you should be good. When you click "Generate", select the Unix Makefiles option.


Open a terminal and cd to the build directory. Type "make" to compile. Assuming everything was done correctly you should have a working GZDoom application bundle.