[CMake] Where does cmake look for include files?

Marianne B. Wiese mbwiese at gmail.com
Sat Aug 9 10:09:47 EDT 2008


Hello

Just to let you know:

It turns out that the way cmake looks for a file to include, is by
TRY_CO)MPILE() a tiny c-file whith for example #include GL/glu.h.

However, Visual C++ cannot compile with #include <glu.h> if <windows.h> is
not included too.
Therefore I will not succeed in compiling FLTK, unless I change
checkincludefiles.cmake.

I think I will give it up, and see if I can get Orfeo Toolbox to work with a
binary installed FLTK instead.

Thanks for the answers.

Marianne
On Fri, Aug 8, 2008 at 10:15 PM, Marianne B. Wiese <mbwiese at gmail.com>wrote:

>  Hi David
>
> It says Cmake 2.4 patch 8.
> Sorry.
> Marianne
>   On Fri, Aug 8, 2008 at 4:19 PM, David Cole <david.cole at kitware.com>wrote:
>
>> What does "cmake --version" report? There was no CMake 2.2.6.....
>>
>>
>>   On Fri, Aug 8, 2008 at 7:02 AM, Marianne B. Wiese <mbwiese at gmail.com>wrote:
>>
>>>   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
>>>
>>> _______________________________________________
>>> CMake mailing list
>>> CMake at cmake.org
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>>
>
>
> --
> Marianne B. Wiese
> Reventlowsgade 30
> 1651 København V
>
> +45 33 22 69 18
>



-- 
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/20080809/1ff03257/attachment.htm>


More information about the CMake mailing list