Priority: Not Evaluated
Resolution: Out of scope
Affects Version/s: None
Fix Version/s: None
Component/s: Project & Build Management
When setting up .pro files for projects for my coworkers, I often have found it helpful to specify the HEADERS and SOURCES using wildcards, e.g.,
HEADERS += *.h
SOURCES += *.cpp
This works great for files within the root project directory. Unfortunately, if there are sub directories within this project directory that contain header and source files, the wildcard does not seem to recursively traverse these directories.
In some cases, we have a lot of sub directories and it can be a bit painful to add a new line manually for each subdirectory, e.g.,
HEADERS += *.h \
SOURCES += *.cpp \
I know Qt Creator provides a way to import an existing project, but in that case it doesn't use wildcards for HEADERS and SOURCES, it includes each file individually.
It would be great if there were a way to specify a recursive option for the wildcards. Perhaps even a way to use the wildcard recursively and then exclude a particular subdirectory with, e.g.,
HEADERS -= unwanteddir*.h
would be great.
This would make writing .pro files by hand for complex codebases a breeze.