LiquidFun Build and Run Instructions
Building for Linux

Version Requirements

Following are the minimum required versions for the tools and libraries you need for building LiquidFun for Linux:

  • OpenGL: libglapi-mesa 8.0.4 (tested with libglapi-mesa 8.0.4-0ubuntu0)
  • GLU: libglu1-mesa-dev 8.0.4 (tested with libglu1-mesa-dev
  • cmake (when building from source):

Before Building

Prior to building, install the following components using the Linux distribution's package manager:

  • cmake. You can also manually install from
  • OpenGL (libglapi-mesa).
  • GLU (libglu1-mesa-dev).

For example, on Ubuntu:

sudo apt-get install cmake
sudo apt-get install libglapi-mesa
sudo apt-get install libglu1-mesa-dev

The sample applications require OpenGL and GLU.


  • Generate makefiles from the cmake project in liquidfun/Box2D.
  • Execute make to build the library and sample applications.

For example:

cd liquidfun/Box2D
cmake -G'Unix Makefiles'

To perform a debug build:

cd liquidfun/Box2D
cmake -G'Unix Makefiles' -DCMAKE_BUILD_TYPE=Debug

Build targets can be configured using options exposed in liquidfun/Box2D/CMakeLists.txt by using cmake's -D option. Build configuration set using the -D option is sticky across subsequent builds.

For example, if a build is performed using:

cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

to switch to a release build CMAKE_BUILD_TYPE must be explicitly specified:

cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release

Executing a Sample

After building the project, you can execute the samples from the command line. For example:


Running Unit Tests

Developers modifying the LiquidFun library can verify that it still working correctly by executing the provided unit tests.

Use the script to execute unit tests: