MantisBT - CMake
View Issue Details
0013995CMakeCMakepublic2013-03-09 00:422013-03-10 17:35
Yichao Yu 
Alex Neundorf 
urgentmajoralways
closedduplicate 
Linux x86-64Arch Linux
CMake 2.8.10.2 
 
0013995: Builtin automoc doesn't automatically include system include path.
When qt is not installed in /usr/include (e.g. installed in /usr/include/qt4 instead), which is the default system include dir, the moc command line generated by builtin automoc doesn't have -I/usr/include argument, even if it has been explicitly added as include dir by include_directories, causing moc not able to find headers installed in the system include dir. Since this is the path the compiler will search anyway (unless using some special switch to turn off maybe?), moc should also search in this(these) path(s), especially when a dependency library has headers installed in it and therefore had added it explicitly.

Since moc may has no idea what exactly the system include dir is (it's not gcc anyway) not to mention whether it has been explicitly added using include_directories in cmake, while cmake has access to these info, cmake should pass these dir as command line arguments (may put them at the end though).
1. Install qt's header in /usr/include/qt4 (so that qt4' qmake -query QT_INSTALL_HEADERS gives /usr/include/qt4) (just as what is done in archlinux's package).
2. Install phonon from git, which has headers installed in /usr/include/phonon and require /usr/include to be in the include path and also uses cmake's builtin automoc for newer cmake in it's git version.
3. Try compiling phonon-vlc from git, using make VERBOSE=1, error will be reported causing by not being able to find the definition of an interface which is actually defined in one of the headers in /usr/include/phonon (which is actually included by that header using #include <phonon/**.h>), the command line shows that -I/usr/include is not in the command line argument and strace the command line also shows the correct path is not searched. Adding -I/usr/include to command line argument works well.
the automoc package works perfect.
No tags attached.
duplicate of 0013762closed Alex Neundorf Automoc still fails to handle Q_INTERFACES 
Issue History
2013-03-09 00:42Yichao YuNew Issue
2013-03-09 03:55Alex NeundorfAssigned To => Alex Neundorf
2013-03-09 03:55Alex NeundorfStatusnew => assigned
2013-03-09 03:59Alex NeundorfNote Added: 0032545
2013-03-09 08:30Yichao YuNote Added: 0032559
2013-03-09 08:51Yichao YuNote Added: 0032560
2013-03-10 17:34Alex NeundorfRelationship addedduplicate of 0013762
2013-03-10 17:35Alex NeundorfNote Added: 0032565
2013-03-10 17:35Alex NeundorfStatusassigned => closed
2013-03-10 17:35Alex NeundorfResolutionopen => duplicate

Notes
(0032545)
Alex Neundorf   
2013-03-09 03:59   
I think this is a duplicate of 0013762 .
In a few days the first release candidate for 2.8.11 will be out.
Can you please give this a try ?
It should fix the problem.
(0032559)
Yichao Yu   
2013-03-09 08:30   
I will give the cmake git master a try. (I think I have found that issue but didn't pay attention to the comment....).
(0032560)
Yichao Yu   
2013-03-09 08:51   
Yes, at least fixed in git master, THX. (haven't found out how to close though..., if possible...).
(0032565)
Alex Neundorf   
2013-03-10 17:35   
No change required, as this has already been fixed for 0013762 .