> You mean in the project files? You can do that only on Product level, not
> for the entire project:

Yes, it was about the Product, I misspelled.
This is what I did, works as I need

Product {
    ...
    Depends { name: "Qt"; submodules: ["core", "network"]; required: false}

    moduleProviders.Qt.qmakeFilePaths: "/invalid"
    condition: Qt.core.present
    ...
}

Colleagues, thank you for your help!

--
BR, Pavel


20.10.2020 23:48, Richard Weickelt пишет:
     qbs build ...  moduleProviders.Qt.qmakeFilePaths:/invalid
Yes, it works. But is it possible to do such a disconnection from the
project itself?
You mean in the project files? You can do that only on Product level, not
for the entire project:

Project {
    // cannot set global moduleProvider here.


     CppApplication {
         // ....

         moduleProviders.Qt.qmakeFilePaths: "/invalid"
     }
}

The fact is that I am developing a demo project, and I would like some
products to be disabled when building, if the user does not have
qt-framework installed.
I still don't get what you want to show. How Qbs behaves when Qt is not
found? You could also simply create two profiles:

1. with moduleProviders.Qt.qmakeFilePaths not set or set to a a valid path,
2. with moduleProviders.Qt.qmakeFilePaths set to invalid.

And then invoke Qbs with the two different profiles.

_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

Reply via email to