conditional include of .pri file Qt
-
In my pro I have this :
contains ( CONFIG, USE_VISION ){ message(With vision) include($$PWD/src/vision.pri) }
message with vision is printed if only CONFIG+=USE_VISION is defined but $$PWD/src/vision.pri is allways included in the project, how can i conditionally include pri files?
-
Hi,
The code is functionally correct.
How do you know it's always included ?
If it's because Qt Creator shows the file, then it's unrelated to it's inclusion or not in your .pro file.
-
If you create a bugreport and ask here, than its nice to cross link: QTCREATORBUG-21037
Even better is to give people a bit time to respond before asking the same question on multiple channels.
Thanks.
-
Couldn't reproduce - works as expected for me with the
qmake
from Qt 5.10.1 -
@ruisebastiao said in conditional include of .pri file Qt:
what is the problem of using multiple channels?
Someone said there's a problem with using multiple channels? It was said that it's recommended, and quite simply polite, to give all the relevant information, including where and what people have already suggested. It is hardly productive to keep the involved parties in the dark, wouldn't you say?