<div dir="ltr"><div>Hi Tonio</div>
<div> </div>
<div>There is a paragraph in the CMakelists.txt regarding OpenGL</div>
<div> </div>
<div> FIND_PACKAGE(OpenGL)<br> IF(OPENGL_FOUND)<br> SET(HAVE_GL 1)<br> INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})<br> ENDIF(OPENGL_FOUND)</div>
<div> </div>
<div>and it seems to work, because cmake generates a config.h file with the line: </div>
<div>#define HAVE_GL 1</div>
<div> </div>
<div>My problem is, that GL/glu.h (GLU not GLUT) is not found.</div>
<div>I may misinterpret the syntax in cmakelists.txt, but I assume that the line</div>
<div>CHECK_INCLUDE_FILES("GL/glu.h" HAVE_GL_GLU_H) </div>
<div>will set HAVE_GL_GLU_H to 1 if the file GL/glu.h is found.</div>
<div> </div>
<div>In the config.h file cmake writes </div>
<div>/* #undef HAVE_GL_GLU_H */</div>
<div>And I want cmake to recognize that I have the header and lib files, and to write</div>
<div>HAVE_GL_GLU_H 1</div>
<div><br>I think, that FLTK's cmakelists.txt file should work, It has been around for a long time.</div>
<div>And when I Google, I do not see my problem pop up.</div>
<div> </div>
<div>Therefore I guess that I make some very basic thing wrong, as I am not used to use CMake.</div>
<div> </div>
<div>Thank you for pointing at *cmakepath*/share/cmake-2.x/Modules. I found the "CheckIncludeFiles.cmake" there. I was wrong then in my question to state that this file does not exist, I had looked for it only in the FLTK-sources.</div>
<div> </div>
<div>I will have a look at that file, and see if I can figure out what to do.</div>
<div> </div>
<div>Marianne<br></div>
<div class="gmail_quote">On Fri, Aug 8, 2008 at 1:18 PM, Antoine PREVOT <span dir="ltr"><<a href="mailto:tonio_lesec@yahoo.fr">tonio_lesec@yahoo.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">> Apparently CMake cannot find the headers for openGL and/or GLU<br>> ...<br></div>
<div class="Ih2E3d">> I would expect cmake to be smart enough to find the glu<br>> header file, since it finds the VCExpress.exe.<br><br></div>Hi Marianne,<br><br>Did you do anything to make cm guess that you want to inclulde GLU headers ? Dunno the detais of your project, but you should have these few lines somewhere :<br>
<br>******************** somepath/CMakeLists.txt<br>...<br>INCLUDE(FindGLUT)<br>IF(GLUT_FOUND)<br> #MESSAGE(STATUS "GLUT found...")<br> #MESSAGE("opengl include directory : ${GLUT_INCLUDE_DIR}")<br> #MESSAGE("opengl library directory : ${GLUT_LIBRARY}")<br>
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR}/Headers)<br> LINK_LIBRARIES(${GLUT_LIBRARY})<br>ELSE(GLUT_FOUND)<br> MESSAGE(FATAL_ERROR "GLUT not found")<br>ENDIF(GLUT_FOUND)<br>...<br><br>See *cmakepath*/share/cmake-2.x/Modules/FindGLUT.cmake for more informations about the way cmake will search for glut.<br>
<br>Cordially,<br><br>Tonio<br>
<div class="WgoR0d"><br><br><br><br> _____________________________________________________________________________<br>Envoyez avec Yahoo! Mail. Une boite mail plus intelligente <a href="http://mail.yahoo.fr/" target="_blank">http://mail.yahoo.fr</a><br>
</div></blockquote></div><br><br clear="all"><br>-- <br>Marianne B. Wiese<br>Reventlowsgade 30<br>1651 København V<br><br>+45 33 22 69 18<br></div>