Skip to content
Joseph Heenan edited this page Nov 13, 2016 · 4 revisions

We intend to switch the project from autoconf over to cmake. The main driver for this is that the current configure.ac is rather buggy and difficult to maintain.

Currently (November 2016) both the old autoconf based system and the new cmake system are in the project master branch and should both be working. The autoconf based system will be removed in a few months one any issues with the cmake system have been ironed out.

To build with cmake run:

cmake .
make

To build with debugging enable (ie. disable optimisations and include debug symbols), use:

cmake . -DCMAKE_BUILD_TYPE=Debug

To make a release build with debug symbols include:

cmake . -DCMAKE_C_FLAGS='-g'

To manually enable/disable options, use:

cmake . \
    -DWITH_FFMPEG=[ON|OFF] \
    -DWITH_MMAL=[ON|OFF] \
    -DWITH_MYSQL=[ON|OFF] \
    -DWITH_PGSQL=[ON|OFF] \
    -DWITH_PTHREAD=[ON|OFF] \
    -DWITH_SDL=[ON|OFF] \
    -DWITH_SQLITE3=[ON|OFF]

To show the commands being run by make, use:

make VERBOSE=1

macOS builds

macOS builds are only supported using the new cmake build system. To build on a mac, first install homebrew from http://brew.sh then run:

brew install ffmpeg cmake pkg-config libjpeg
cmake .
make

To build inside Xcode instead (useful for developers) use:

cmake -G Xcode .

then open the generated .xcodeproj in Xcode. There is currently a bug in cmake that means you need to explicitly add /usr/local/lib to the linker path, otherwise Xcode will fail to find the ffmpeg libraries.

Clone this wiki locally