Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qmake with INCLUDEPATH ignores dependencies

I use qmake to build a project. The project contains several static libs and a executable. The executable links to the static libraries and therefore has the path of the library added to the INCLUDEPATH variable.

When I change something in the header files of the executable everything is rebuild as expected. When changing a header file of the library it just rebuilds the library and relinks the executable. Source files in the executable that include header files from the library are not rebuild correctly.

After investigating the problem I saw that the generated makefiles do not track the dependencies correctly. Only files included with a relative path are tracked. Any header included via INCLUDEPATH is not tracked. Is there something I can do to make it work as expected?

like image 265
David Feurle Avatar asked May 31 '11 05:05

David Feurle


1 Answers

You should add the paths you added to INCLUDEPATH to DEPENDPATH as well.

like image 139
mtvec Avatar answered Sep 24 '22 00:09

mtvec