[Interest] passing something into subdirs qmake

Kai Köhne Kai.Koehne at qt.io
Wed Jun 5 13:27:11 CEST 2019


> I want to invent some convenient way to switch between two variations
 > of the same app.

How do you plan to set these?

If it's via command line (e.g. qmake CONFIG+= ...): This will be passed automatically to SUBDIRS projects.

If you somehow detect it otherwise: The common pattern here is to have the switch logic in a .pri file, and include it from all .pro files needing it.

Regards

Kai
________________________________
From: Interest <interest-bounces at qt-project.org> on behalf of Vyacheslav Lanovets <sol at lanovets.ru>
Sent: Wednesday, June 5, 2019 10:32 AM
To: interest at qt-project.org
Subject: [Interest] passing something into subdirs qmake

Hello,

I want to invent some convenient way to switch between two variations
of the same app. Current approach is to have 2 pro files with subdirs
inside.
The selected config is passed into subdirs like this:

product_var="MYAPP1=true"
write_file(".qmake.conf", product_var)

This is not reliable and confuses Qt Creator. Is there any other way
to pass something from pro files into subdirs dependencies?

Regards,
Vyacheslav
_______________________________________________
Interest mailing list
Interest at qt-project.org
https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190605/74e48503/attachment.html>


More information about the Interest mailing list