Hello all,
if I have a pro file
What is the best way to update the SOURCES and HEADERS
automatically based on the file in the subdirs
thanx
Eli
Hello all,
if I have a pro file
What is the best way to update the SOURCES and HEADERS
automatically based on the file in the subdirs
thanx
Eli
You should be able to do:
qmake Code:
SOURCES+=*.cpp HEADERS+=*.hTo copy to clipboard, switch view to plain text mode
But you still have to rerun qmake after creating a new file.
thanx!
but its only works for files in the current directory
I need a solution for all sub directories
qmake can't do that. Unless you add a .pri file into each directory and include each of them from your .pro file. But then if you want to add another directory, you have to include its pri file again.
qmake can do it. first shot is
SOURCES += $$system("find . -name '*.cpp'")
HEADERS += $$system("find . -name '*.h'")
Which will happily add all moc and uic generated files as well... and will cause the whole directory tree to be rescanned upon every call to qmake. Let's not automate things too much guys.
Bookmarks