[CMake] check_include_files() can't "find" header because it can't compile test app

Casey Jones jonescaseyb at gmail.com
Sun Sep 13 15:12:35 EDT 2009


Hello, I'm trying to link a Qt4 library into my program as an optional 
dependency.  I can get it to find and link the library with a FindFoo.cmake.  
But when I use check_include_files( foo.h HAVE_FOO_H ) it says it can't find the 
header.  So looking in CMakeError.log it says it found foo.h but since it 
includes Qt headers like: 
#include <QString> 
instead of 
#include <qt4/QtCore/QString>
it can't compile the test program.

Is there a way to have check_include_files() not compile the test program and 
just make sure the header exists?  Or is there some other way to create the 
config.h.in and config.h?

I'd rather not fork the library just to change the includes.  ;)


More information about the CMake mailing list