Can I change Qt's pro file settings to influence sub-projects settings?
-
I need to know if qmake could process sub-projects based on super-project settings, In other words, to set sub-project dependent on super pro file. Thanks in advance.
-
I need to know if qmake could process sub-projects based on super-project settings, In other words, to set sub-project dependent on super pro file. Thanks in advance.
Hi @jiancaiyang,
I need to know if qmake could process sub-projects based on super-project settings, In other words, to set sub-project dependent on super pro file.
Yes, in a slightly inverted way. The super project "pro" file can include sub-projects, but this is mostly a build-target / dependency convenience. However, the sub-projects can each include a common qmake include "pri" file to share common project settings.
For a simple example, have a read of https://dragly.org/2014/03/13/new-project-structure-for-projects-in-qt-creator-with-unit-tests/ and note the use of the multiple *.pro files, with one *.pri file. And a more elaborate (real world) example from one of my open source projects - https://github.com/pcolby/bipolar/blob/master/common.pri
Cheers.
-
Hi,
What kind of settings do you have in mind ?