<div dir="ltr"><div>Hi Tonio</div>
<div>&nbsp;</div>
<div>There is a paragraph in the CMakelists.txt regarding OpenGL</div>
<div>&nbsp;</div>
<div>&nbsp; FIND_PACKAGE(OpenGL)<br>&nbsp; IF(OPENGL_FOUND)<br>&nbsp;&nbsp;&nbsp; SET(HAVE_GL 1)<br>&nbsp;&nbsp;&nbsp; INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})<br>&nbsp; ENDIF(OPENGL_FOUND)</div>
<div>&nbsp;</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>&nbsp;</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(&quot;GL/glu.h&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HAVE_GL_GLU_H)&nbsp;&nbsp;&nbsp; </div>
<div>will set HAVE_GL_GLU_H to 1 if the file GL/glu.h is found.</div>
<div>&nbsp;</div>
<div>In the config.h file cmake&nbsp;writes&nbsp;</div>
<div>/* #undef HAVE_GL_GLU_H */</div>
<div>And I want&nbsp;cmake to recognize&nbsp;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&#39;s cmakelists.txt file should work, It has&nbsp;been around for a long time.</div>
<div>And when I Google, I do not see&nbsp;my problem pop up.</div>
<div>&nbsp;</div>
<div>Therefore I guess that I make some very basic thing wrong, as I am not used to use CMake.</div>
<div>&nbsp;</div>
<div>Thank you for pointing at *cmakepath*/share/cmake-2.x/Modules. I found the &quot;CheckIncludeFiles.cmake&quot; 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>&nbsp;</div>
<div>I will have a look at that file, and see if I can figure out what to do.</div>
<div>&nbsp;</div>
<div>Marianne<br></div>
<div class="gmail_quote">On Fri, Aug 8, 2008 at 1:18 PM, Antoine PREVOT <span dir="ltr">&lt;<a href="mailto:tonio_lesec@yahoo.fr">tonio_lesec@yahoo.fr</a>&gt;</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">&gt; Apparently CMake cannot find the headers for openGL and/or GLU<br>&gt; ...<br></div>
<div class="Ih2E3d">&gt; I would expect cmake to be smart enough to find the glu<br>&gt; 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>&nbsp;#MESSAGE(STATUS &nbsp;&quot;GLUT found...&quot;)<br>&nbsp;#MESSAGE(&quot;opengl include directory : ${GLUT_INCLUDE_DIR}&quot;)<br>&nbsp;#MESSAGE(&quot;opengl library directory : ${GLUT_LIBRARY}&quot;)<br>
&nbsp;INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR}/Headers)<br>&nbsp;LINK_LIBRARIES(${GLUT_LIBRARY})<br>ELSE(GLUT_FOUND)<br>&nbsp;MESSAGE(FATAL_ERROR &quot;GLUT not found&quot;)<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>&nbsp; &nbsp; &nbsp;_____________________________________________________________________________<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>