qmake HEADERS/SOURCES and INCLUDEPATH
Hi i hope someone can help me i don'T know what i'm doing wrong here. Im trying to include sources and headers from another directory to my project on a windows system im doing the following:
in the .pro file:
win32:INCLUDEPATH += "C:/Users/John/workspace/lib"
win32:INCLUDEPATH += $$quote(C:/Users/John/workspace/lib)
HEADERS += ...
...
...
extras/headerclassx.h \
extras/headerclassy.h
SOURCES+= ...
...
...
extras/sourceclassx.cc \
extras/sourceclassy.cc
This doesn't work, qmake allways prints the error "Failure to find extras\headerclassx.h" which is located in the "C:/Users/John/workspace/lib" path that is included with INCLUDEPATH.
However it works well when i change the path in the HEADERS and SOURCES to the absolute path of the files C:/Users/John/workspace/lib/extras/headerclassx.h
How can i tell qmake to use relative paths? What am i doing wrong?
Re: qmake HEADERS/SOURCES and INCLUDEPATH
Why can't you just add the full path to INCLUDEPATH ?
Code:
win32:INCLUDEPATH += "C:/Users/John/workspace/lib" "C:/Users/John/workspace/lib/extras"
win32:DEPENDPATH += "C:/Users/John/workspace/lib" "C:/Users/John/workspace/lib/extras"
HEADERS += ...
...
...
headerclassx.h \
headerclassy.h
SOURCES+= ...
...
...
sourceclassx.cc \
sourceclassy.cc
Re: qmake HEADERS/SOURCES and INCLUDEPATH
INCLUDEPATH is for including files from within C++ code. What you want is DEPENDPATH.