[CMake] Where does cmake look for include files?

Marianne B. Wiese mbwiese at gmail.com
Fri Aug 8 07:02:04 EDT 2008


Hello

I am trying to build FLTK in order to build the Orfeo Toolbox later.
Apparently CMake cannot find the headers for openGL and/or GLU

I use:
Visual C++ 9 2008
CMake 2.2.6
FLTK 1.1.8

I put Gl.h and glu.h in E:\Program Files\Microsoft Visual Studio
9.0\VC\include\GL

FLTK CMakelists.txt has this paragraph:

INCLUDE(CheckIncludeFiles)
<-------------- Remark: CheckIncludeFiles.cmake does not exist
# Check if header file exists and add it to the list.
MACRO(CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
  CHECK_INCLUDE_FILES("${PROJECT_INCLUDES};${FILE}" ${VARIABLE})
  IF(${VARIABLE})
    SET(PROJECT_INCLUDES ${PROJECT_INCLUDES} ${FILE})
  ENDIF(${VARIABLE})
ENDMACRO(CHECK_INCLUDE_FILE_CONCAT)
CHECK_INCLUDE_FILE_CONCAT("GL/glu.h"       HAVE_GL_GLU_H)
<--------- Looking for GL/glu.h
CHECK_INCLUDE_FILE_CONCAT("OpenGL/glu.h"   HAVE_OPENGL_GLU_H)
CHECK_INCLUDE_FILE_CONCAT("dirent.h"       HAVE_DIRENT_H)
CHECK_INCLUDE_FILE_CONCAT("stdio.h"        HAVE_STDIO_H)
CHECK_INCLUDE_FILE_CONCAT("strings.h"      HAVE_STRINGS_H)
CHECK_INCLUDE_FILE_CONCAT("sys/dir.h"      HAVE_SYS_DIR_H)
CHECK_INCLUDE_FILE_CONCAT("sys/ndir.h"     HAVE_SYS_NDIR_H)
CHECK_INCLUDE_FILE_CONCAT("sys/select.h"   HAVE_SYS_SELECT_H)
CHECK_INCLUDE_FILE_CONCAT("sys/stdtypes.h" HAVE_SYS_STDTYPES_H)
CHECK_INCLUDE_FILE("pthread.h"      CMAKE_HAVE_PTHREAD_H)

And here is an excerpt from CMakeCache.txt

//What is the target build tool cmake is generating for.
CMAKE_BUILD_TOOL:INTERNAL=E:/PROGRA~1/MICROS~1.0/Common7/IDE/VCExpress.exe
.....
//Have includes HAVE_DIRENT_H
HAVE_DIRENT_H:INTERNAL=
//Have includes HAVE_GL_GLU_H
HAVE_GL_GLU_H:INTERNAL=
<---------------------GL/glu.h not found.
//Have includes HAVE_OPENGL_GLU_H
HAVE_OPENGL_GLU_H:INTERNAL=
.......
//Have include HAVE_STDIO_H
HAVE_STDIO_H:INTERNAL=1
//Have symbol int strcasecmp()
HAVE_STRCASECMP:INTERNAL=1
//Have includes HAVE_STRINGS_H
HAVE_STRINGS_H:INTERNAL=
...
//Have includes HAVE_SYS_DIR_H
HAVE_SYS_DIR_H:INTERNAL=
//Have includes HAVE_SYS_NDIR_H
HAVE_SYS_NDIR_H:INTERNAL=
//Have includes HAVE_SYS_SELECT_H
HAVE_SYS_SELECT_H:INTERNAL=
//Have includes HAVE_SYS_STDTYPES_H
HAVE_SYS_STDTYPES_H:INTERNAL=
//Have symbol vsnprintf
HAVE_VSNPRINTF:INTERNAL=1

I would expect cmake to be smart enough to find the glu header file, since
it finds the VCExpress.exe.
I have a Visual Studio Trial version in the same dirctory E:\Program
Files\Microsoft Visual Studio 9.0 though.

Does CMAke have a default search path that I have to set? Visual studio is
not in Windows environment PATH.

Marianne B. Wiese
Reventlowsgade 30
1651 København V

+45 33 22 69 18
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080808/b3371898/attachment-0001.htm>


More information about the CMake mailing list