Qmake: how to create dependencies without TEMPLATE = subdirs
TL; DR: Is there a way to create a target from a .pro file in another project without using TEMPLATE = subdirs?
Long version:
I have a complex project ( mycomplexproject
) with a lot of sub-files and * .pro files. One module ( moduleA
) depends on a DLL built in another project outside of that project ( anotherproject
). Since I cant create a * .pro file with subdirs template in somerootdir
. Is there a way to add a dependency in moduleA.pro
, so it anotherproject
gets created on build moduleA
and anotherproject.dll
doesn't exist without having to create a * .pro file in somerootdir
?
somerootdir /
anotherproject / // must be independent of mycomplexproject
anotherproject.pro
lib /
anotherproject.dll // the result of building anotherproject
[...]
mycomplexproject /
core /
core.pro
modules /
moduleA /
moduleA.pro // depends on anotherproject.dll built from anotherproject.pro
moduleB /
moduleB.pro
modules.pro // uses subdir template
mycomplexproject.pro // uses subdir template
PS: moduleA
only created under certain circumstances, and building anotherproject
is only needed when building moduleA
.
source to share
No one has answered this question yet
Check out similar questions: