Efficient way to include recursive directories
-
Hello,
I am looking for a better way to include the recursive directories.
Example:
src/ src/scene1 src/scene1/scene1.h src/scene1/scene1.cpp src/scene2 src/scene2/scene2.h src/scene2/scene2.cpp .....
In order to avoid the relative path include,
I have to write .pro like this:INCLUDEPATH+=$PWD../../src/ INCLUDEPATH+=$PWD../../src/scene1 INCLUDEPATH+=$PWD../../src/scene2
I would like to avoid adding sub folders in the INCLUDEPATH because, I have 50+ sub folders and they contain their owen structure as well.
Is there any efficient way to handle this?
-
Hi,
Depending on your OS you could try with system + find to get the list of folders in src
Hope it helps
-
Hi,
Depending on your OS you could try with system + find to get the list of folders in src
Hope it helps
Sam,
Hmm. You mean to say to use the linux command
find
How can I do this from pro file?
And is this the only way?
Thanks,
Kumara -
Yes, that's it.
With system
AFAIK, currently, yes. I may be wrong though but I didn't see anything allowing to retrieve a folder list directly with qmake.
@SGaist Okay! Thank you.