[CMake] QT4_WRAP_UI, INCLUDE_DIRECTORIES and source tree structure

Alexander Neundorf a.neundorf-work at gmx.net
Tue Nov 6 19:17:33 EST 2007


On Wednesday 07 November 2007, Christiaan Putter wrote:
> Thanks for the reply Alexander,
>
> I've tried both "" and <>, though <> makes more sense since ui_*.h isn't in
> the source tree and cmake should be telling the compiler where to look for
> it.

Then you need to add the include path. 

> So when using INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ), how long
> does that stay in the include directories?  Is it local to the current
> CMakeLists file?  Why?

It is for that file and it is inherited tp all subdirectories (via 
ADD_SUBDIRECTORY)

> Obviously adding the include directory myself works, though it seems to
> defeat the entire purpose of using cmake if I have to keep track of my
> header files in the end myself in any case.  Should one rather have all the

You need to tell cmake which include dirs to use, it can't do that 
automatically.

Bye
Alex


More information about the CMake mailing list