[Qbs] Any novice tickets

Иван Комиссаров abbapoh at gmail.com
Mon Dec 10 22:50:14 CET 2018


https://codereview.qt-project.org/#/c/247814/1

Can you please take a look what I am doing wrong? For some reason, properties from libprotobuf module can’t be read in protobuf.cpp module… I have no clue, because within the module everything’s fine:

I get the following output:

WARNING: /usr/local/include
WARNING: /usr/local/lib
WARNING: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
WARNING: true // libprotobuf.present
WARNING: 0 // libprotobuf.includePaths.length
WARNING: 0 // libprotobuf.libraryPaths.length

> 10 дек. 2018 г., в 15:12, Иван Комиссаров <abbapoh at gmail.com> написал(а):
> 
> I hope I could use inheritance, composition may require too many boilerplate code. Ok, thanks anyway.
> 
> Иван Комиссаров
> 
>> 10 дек. 2018 г., в 10:44, Christian Kandeler <Christian.Kandeler at qt.io> написал(а):
>> 
>> On Sun, 9 Dec 2018 20:29:58 +0100
>> Иван Комиссаров <abbapoh at gmail.com> wrote:
>> 
>>> Ok, I’ve got another question. I would like to separate a protobuf.cpp module in 3 parts - the manual one, auto-detected by probes, and the auto-detected with pkgconfig.
>>> But I’ve encountered a problem that I can’t use probes to detect if the module should be used, i.e. use them in the «condition» variable. The «found» property is false at that moment (but is true in validate)
>>> 
>>> ProtobufCppBase {
>>>   priority: 75
>>>   condition: includeProbe.found && libraryProbe.found
>>>   // ...
>>> }
>> 
>> That's not possible. Probes are evaluated after the module has been loaded, long after the condition has been evaluated.
>> If you want to split up the module, I suppose it could be done using composition, i.e. introduce separate internal modules and conditionally load them from the main module:
>>   Depends { name: "protobuf.cpp_pkgconfig"; required: false }
>>   Depends { name: "protobuf.cpp_probes; condition: !protobuf.cpp_pkgconfig.present; required: false }
>>   // etc
>> 
>> 
>> Christian
>> _______________________________________________
>> Qbs mailing list
>> Qbs at lists.qt-project.org
>> https://lists.qt-project.org/listinfo/qbs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20181210/97679d77/attachment.html>


More information about the Qbs mailing list