[CMake] include_directories and qt4_wrap_cpp

Michael Wild themiwi at gmail.com
Mon Aug 2 11:02:28 EDT 2010


On 2. Aug, 2010, at 16:44 , Dennis Schridde wrote:

> Hello!
> 
> I setup include_directories and then call qt4_wrap_cpp for a set of
> files. What I am seeing now is that the set of -I flags for moc are
> different from those for the
> compiler:
> 
> include_directories(/a/b/c/lib/mylib/framework)
> qt4_wrap_cpp(MOC
> testfile.hpp)
> 
> [<< Commandlines shortened for readability >>]
> /usr/bin/moc
> [...] -F/a/b/c/lib [...] -o moc_testfile.cxx testfile.hpp
> [...]
> /usr/bin/c++
> [...] -I/a/b/c/lib/mylib/framework -o testfile.cpp.o -c testfile.cpp
> 
> My
> first guess is that CMake detects the pattern lib/mylib/framework as
> something special, strips the mylib/framework part, and thus screws up.
> 
> Can
> someone elaborate on this behaviour?
> 
> Kind regards,
> Dennis

I didn't look into the source code, but looks like there is some REGEX REPLACE which is too simplistic. Probably there is a missing escape for the . character, thus making it also match /framework, instead of just .framework.


Michael



More information about the CMake mailing list