qmake with INCLUDEPATH ignores dependencies

对着背影说爱祢 提交于 2019-12-10 13:54:00

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/6183533/qmake-with-includepath-ignores-dependencies

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!