[CMake] include_directories - newbie

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jul 20 17:56:31 EDT 2009


On Friday 17 July 2009, Mark Lohry wrote:
> I have this snipped in my cmakelists:
>
> IF( EXISTS "/someabsolutedirectory/unixem-1.8.2/include/glob2.h" )
>     message( "/someabsolutedirectory/unixem-1.8.2/include/glob2.h exists" )
> ENDIF( EXISTS "/someabsolutedirectory/unixem-1.8.2/include/glob2.h" )
>
> INCLUDE_DIRECTORIES( "/someabsolutedirectory/unixem-1.8.2/include" )
> INCLUDE(CheckIncludeFiles)
> CHECK_INCLUDE_FILES( glob2.h HAVE_GLOB2_H )

Did you also set CMAKE_REQUIRED_INCLUDES as stated in the docs ?
include_directories() applies to the current project, but not to the tiny test 
project created internally for check_include_files().

Alex


More information about the CMake mailing list