Add an "umbrella" .pro file, with the following contents:
TEMPLATE = subdirs
SUBDIRS += firstproj secondproj
# Use ordered build, from first subdir (firstproj) to the last (secondproj):
CONFIG += ordered
Directories firstproj/
and secondproj/
should be located in the same dir as this umbrella .pro file.
Inside directories firstproj/
and secondproj/
we should have firstproj.pro and secondproj.pro accordingly.