Re: [Qbs] How to explicitly prohibit the use of qt-framework in project

2020-10-20 Thread 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


Re: [Qbs] How to explicitly prohibit the use of qt-framework in project

2020-10-20 Thread Карелин Павел



20.10.2020 09:04, Richard Weickelt пишет:

Hi,

you may try

 qbs build ...  moduleProviders.Qt.qmakeFilePaths:/invalid
Yes, it works. But is it possible to do such a disconnection from the 
project itself?
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.




to configure a non-existing location. You can also set this property in your 
profile if you like.


-Original Message-
From: "Карелин Павел" 
To: qbs@qt-project.org
Sent: Mon, 19 Oct 2020 20:26
Subject: [Qbs] How to explicitly prohibit the use of qt-framework in project

Hi !

I need to check the build of the project for the case where qt-framework
is not installed
For this I have created the following construction:

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

Then in QtC I created a profile without qt-framework, and I tried to
build the project. ... and the project was built.
It turned out that QBS found qt-framework on my system (Linux Kubuntu).

Question: to make the QBS strictly follow the the build profile, and
does not look for qt-framework where they are not asked for it?

I use QBS 1.16

--
BR, Pavel Karelin


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


Re: [Qbs] How to explicitly prohibit the use of qt-framework in project

2020-10-20 Thread Christian Kandeler

On 10/19/20 8:26 PM, Карелин Павел wrote:

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

Then in QtC I created a profile without qt-framework, and I tried to 
build the project. ... and the project was built.

It turned out that QBS found qt-framework on my system (Linux Kubuntu).


Yes, because qmake was found in the PATH. Toolchains work the same way. 
If you don't explicitly set the respective property, auto-detection 
kicks in.



Christian

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