This forum has been archived. All content is frozen. Please use KDE Discuss instead.

CMake Error about Eigen, not found target "openglsupport"

Tags: None
(comma "," separated)
dengmingfei
Registered Member
Posts
1
Karma
0
I try to compile Eigen. When I use CMake to generate Makefile, encounter this error:
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:
GLUT_Xmu_LIBRARY (ADVANCED)
linked by target "openglsupport" in directory /home/mingfeideng/workdir/eigen/eigen-eigen-ce5a455b34c0/unsupported/test


I check the /unsupported/test/CMakeLists.txt , found the error generate by this code
Code: Select all
  if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
    include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS})
    ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ")
    set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
    ei_add_test(openglsupport  "" "${EIGEN_GL_LIB}" )
  else()
    ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
  endif()


if I modify the code as below, the error will gone, but if compile in this way Eigen maybe not support OpenGL.
Code: Select all
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")


Is there someone know how to fix this problem in right way?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Eigen is header only, so there is nothing to configure/compile to use Eigen. The cmake build scripts are only for building the unit tests and the documentation. (and also to provide a "make install" copying the header files.).

You can bypass OpenGL cheking with cmake -DEIGEN_TEST_NO_OPENGL=OFF.

The origin of your problem seems to come from the FindGLUT.cmake cmake module which defines GLUT_FOUND to true whereas some of its dependencies are missing.

See also: http://ubuntuforums.org/showthread.php?t=1703770


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft