Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Can I change Qt's pro file settings to influence sub-projects settings?
jiancaiyang last edited by
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.
Paul Colby last edited by
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
What kind of settings do you have in mind ?