KcFnMi KcFnMi - 1 year ago 74
C++ Question

qmake Language, how to get current folder name?

The question:

How to read file content into a qmake variable and pass it to the compiler?

Address the issue of reading a text file via


Instead of reading a text file, I would like to get current folder (the folder where this file is in) name. How do I do that?

Answer Source

Does $$PWD do what you want?

From the documentation:

The PWD variable specifies the full path leading to the directory containing the current file being parsed. This can be useful to refer to files within the source tree when writing project files to support shadow builds.