2
votes

I have multiple qmake .pro files which are called from a root .pro file with a subdirs template.

What is the best way to change a setting for the whole build system (eg. release to debug).

Currently I can only do this by changing each sub .pro file, or using an external script to change each .pro file.

I was hoping there was a way to share qmake variables between the subdirs .pro file and the others.

2

2 Answers

1
votes

The only way I know of doing this is through an include file: define all your variables in a vars.pri file at the root of your project and use include() in the .pro files to access the shared variable.

0
votes

Qt Creator takes care of the issue quite nicely. When you compile a subdir project with a config all the child projects gets compiled with the config.

And for the all project tree a single shadow-build directory is used.