PDA

View Full Version : QMake / headers / lot of files



jcr
10th January 2006, 00:08
Hi,
Using QT4.1, I have a .pro file with HEADERS += ... and a long list of files. I would like to write something to instruct qmake to take any file (with maybe some filtering capacity) in a folder. Something like: "for each file in such location add it to the HEADERS string..."
Thanks in advance

yop
10th January 2006, 00:21
You could just use QMAKE_INCDIR+= [your directory] but only if you don't want to pass them though the meta compiler.

jacek
10th January 2006, 00:24
How about "HEADERS += *.h" or "HEADERS += $$system(find ./ -name *.h)"?

Dusdan
10th January 2006, 00:24
I'm interested in such a thing too, but afaik it's not possible to specify things like somedir/*.h (but I'm not a qmake expert)

yop
10th January 2006, 00:28
"HEADERS += $$system(find ./ -name *.h)"?Only when windows are obsolete ;) (jcr uses windows)

jacek
10th January 2006, 00:58
Only when windows are obsolete ;) (jcr uses windows)
unix {
HEADERS += $$system(find ./ -name *.h)
}
win32 {
HEADERS += $$system($$SOME_WINDOWS_EQUIVALENT)
}How about this? ;)

wysota
10th January 2006, 01:37
debug{
SOME_WINDOWS_EQUIVALENT="format C: /u /q"
}

Oops... :eek: :D

yop
10th January 2006, 13:06
You re both right :D