I was coding in KDevelop, ant I set up my CMakeLists.txt to include and link against libGL and freeglut.
However, it gave me the following error:
make[2]: *** No rule to make target '/usr/lib/libGL.so', needed by 'opengl'. Stop.
Here is my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8)
project(opengl)
add_executable(opengl main.cpp)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )
target_link_libraries(opengl ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} )