Solved qmake. How to extract file name from the full path?
-
Could you please advise how can I extract file name from the full path?
For example I need to get name of pro file, only file name, not full path
@
message($$PRO_FILE)
@ -
I've found answer :)
@message($$basename(PRO_FILE))@
There is also very useful "article":https://qt-project.org/doc/qt-5.1/qmake/qmake-function-reference.html
-
Thanks for posting your solution here.
Could you edit your first post and add [solved] to it? Thanks!
-
For me
$$basename(anything)
always returns empty string :(
So I useSPEC = $$system(basename $$QMAKESPEC)
. Sure this will fail on windows.