Reputation: 24770
If I include(someOtherProject.pri)
in my .pro
, and that other project file (.pri) has INCLUDEPATH += .
in it, then shouldn't my files in my .pro find those headers when I #include
them? I cleaned and ran qmake on everything, regenerated the .pri file by simply copying the .pro from that other project and renaming it with the .pri extension, but when I #include
a file from that other project, compiler says it cannot find it.
I wouldn't expect that I must also edit the INCLUDEPATH
of my working .pro file if I am already using include(someOtherProject.pri)
-- that would make the point of using include(someOtherProject.pri)
unnecessary altogether.
Upvotes: 0
Views: 1748
Reputation: 24770
The solution is to have INCLUDE PATH += $$PWD/
in the .pri instead, as this will expand out to the proper hard-coded path no matter where it is included.
Upvotes: 2