CMake could not find OpenGL in Ubuntu

I want to install VTK in Ubuntu. CMake sends me this error :

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-2.8/Modules/FindOpenGL.cmake:161 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) Rendering/OpenGL/CMakeLists.txt:196 (find_package)

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OPENGL_INCLUDE_DIR (ADVANCED) used as include directory in directory /home/pilou/Documents/src/VTK-6.2.0/Geovis/Core

I have hence installed freeglut3 and build-essential (as I have seen on Internet). But nothing has changed.

How could I find opengl to write my own link to CMake? What else could I do to install VTK?

Answers


Ok finally I just need to install freeglut3-dev instead of freeglut3 ! It contains the development librairies and headers for freeglut3.

FIY, you can install it with on Linux:

sudo apt-get install freeglut3-dev

You don't need any version of GLUT to satisfy a dependency on OpenGL. What you need is OpenGL headers and libraries. In Ubuntu they are installed with the libgl1-mesa-dev package.


Need Your Help

How can I increment a date?

c# .net

I have two dates as duedate as 03/03/2011 and returndate as 03/09/2011. I want to find the fine in double when I subtract duedate from returndate.How can duedate be incremented?

Android - multi-line linear layout

android android-layout

I need a multi-line layout, which would behave as horizontal linear layout, but when there is not enough space to place new widget it would expand to next line, just like words in text. Widgets wou...