I came across a lib missing problem in my app, it turns out that this might relate to my understanding of $$PWD and . in .pro file of qt project.
So do $$PWD and . both mean the dir, which contains the .pro file OR the dir, which is generated by building process(like: ****-build-desktop-Qt_4_8_1_in_PATH__System__Debug). Or, they mean different things.
in some variable declaration like OBJECTS_DIR = obj/Obj, it looks like that . means the generated dir. Whereas, in HEADERS += remoteclient.h ./RealPlay/realplay.h \, it looks like that . means the dir that contains .pro file.
How about their meanings in LIBS and DESTDIR, etc. ?
$$PWD means the dir where the current file (.pro or .pri) is.
It means the same in LIBS. I just used it like this in my project:
LIBS += -L$$PWD/deps/android -lopenal
. doesn't have any special meaning in the .pro file. It means the same thing as in Linux/Unix shell: the current working directory. If you use it in LIBS, it will most probably refer to the build directory where the link command is being run. . is not expanded. If you say -L. the linker will literally get -L.
In the case of HEADERS += remoteclient.h ./RealPlay/realplay.h \ qmake will treat these paths relative to $$PWD so it doesn't matter if there's . or not. HEADERS += $$PWD/remoteclient.h $$PWD/./RealPlay/realplay.h \ would be the effective search paths in this case. Otherwise out-of-source builds wouldn't work.
Note that . in the middle of a path doesn't do anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With