Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a Qt 5 programmer have to know about DEPENDPATH qmake variable?

Tags:

qt

qmake

With Qt 4 you are bound to get in trouble if you do not setup the variable correctly.

like image 733
Sergey Skoblikov Avatar asked May 27 '13 08:05

Sergey Skoblikov


1 Answers

If you program with Qt 5 you can safely forget that DEPENDPATH variable exists. All included files will generate dependencies for files in which they are included regardless of directories they reside.

You don't have to put up with the variable in Qt 4 too. Just add this to your .pro file:

CONFIG += depend_includepath

If you want to use DEPENDPATH variable for some reasons with Qt 5 you can switch the option off:

CONFIG -= depend_includepath

But be aware that DEPENDPATH variable behavior was changed in Qt 5 so even with the option turned off you won't get exact Qt 4 emulation.

Bottom line: forget about DEPENDPATH and don't use it.

If you can read Russian there is more info here.

like image 178
Sergey Skoblikov Avatar answered Oct 11 '22 08:10

Sergey Skoblikov