Menu

#202 cmake fails with mysterious error when GLEW is not installed

closed-fixed
nobody
5
2010-02-12
2010-02-12
marco.m
No

Hi,

I am using tulip SVN r2323.

The cmake configuration phase (btw very good idea adding support for cmake :-) fails if GLEW is not installed on the system, with a weird error message:

======================
$ cmake ..

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:
GLEW_LIBRARY (ADVANCED)
linked by target "tulip-ogl-3.3" in directory tulip-svn/library/tulip-ogl/src

-- Configuring incomplete, errors occurred!

To me it is not clear if GLEW is required or optional. Assuming it is required, the included patch gives a more understandable error message:

======================
$ cmake ..
CMake Error at CMakeLists.txt:75 (message):
Cannot find the GLEW library (required)

-- Configuring incomplete, errors occurred!

BTW, as you may know, cmake doesn't require any more to repeat the confusing condition inside an IF also in the ENDIF, this is why I am leaving that out.

Here is the patch:

Index: CMakeLists.txt

--- CMakeLists.txt (revision 2323)
+++ CMakeLists.txt (working copy)
@@ -71,6 +71,9 @@
ENDIF(PNG_FOUND)

INCLUDE(FindGLEW.cmake)
+IF(NOT GLEW_FOUND)
+ message(FATAL_ERROR "Cannot find the GLEW library (required)")
+ENDIF()
INCLUDE(FindXML2.cmake)

## -----------------------------------------------------------------------------------------------

Discussion

  • Patrick Mary

    Patrick Mary - 2010-02-12
    • status: open --> closed-fixed
     
  • Patrick Mary

    Patrick Mary - 2010-02-12

    Thank you very much for your feedback.
    The proposed patch has been included in the current svn code line.

     

Log in to post a comment.

MongoDB Logo MongoDB