Use rpath=TGTDIR for all tests

Having TGTDIR as part of the rpath (while testing) makes it a lot simpler to
execute the applications, else LD_LIBRARY_PATH must be set to include
TGTDIR. Which is of course forgotten when a new shell is started.
Extend glob-expansion for all SRCS-variables

Cherry-picked from master
Add more ui-files and source to build tests

More files and more dependencies makes the build tests more complicated and
exercises the dependency setup better. Qt ui-files must be completed before
compilation starts. Mocing headers must also be completed before compilation
but can only be moced after the ui-processes is complete etc.