CMake could not find OpenGL in Ubuntu

EDIT Following the answer, we don’t need to install freeglut (SDK for windows) but installing mesa is enough.

You can install mesa an implementation of OpenGL. See indications in the answer.

Therefore, if you have an error such that:

Could NOT find OpenGL

Then, you want to install libgl1-mesa-dev. With debian-based system:

sudo apt-get install libgl1-mesa-dev

For an error, such that:

Could NOT find OpenGL (missing: EGL)

Then, you want to install libegl1-mesa-dev. With debian-based system:

sudo apt-get install libegl1-mesa-dev

Leave a Comment