[Qbs] Failed build the project with QBS 1.22.1

Карелин Павел hkarel at yandex.ru
Tue May 3 13:19:39 CEST 2022



03.05.2022 11:39, Christian Kandeler пишет:
> On 5/2/22 18:27, Карелин Павел wrote:
>> I am using the construct:
>>
>> Product {
>>     name: "SharedLib"
>>
>>     property var exportIncludePaths: [
>>         "./",
>>         "./shared",
>>     ]
>>
>>     Export {
>>         Depends { name: "cpp" }
>>         cpp.includePaths: product.exportIncludePaths
>>     }
>> }
>
> Just use this as-is, except with exportingProduct in the Export item.
>
>
>> Export {
>>         Depends { name: "cpp" }
>>         cpp.includePaths: [exportingProduct.cpp.includePaths]
>>     }
>
> I'm not entirely sure, but this might use the merged value, 
> potentially pulling in more paths than you want. Using a dedicated 
> property seems cleaner.
The construct 'cpp.includePaths: [exportingProduct.cpp.includePaths]' 
does not work. QBS parsed it, but apparently the paths are not exported. 
The project is not built, the required header files are not found.
My old version works with replacing 'product' on 'exportingProduct':

    property var exportIncludePaths: [
         "./",
         "./shared",
     ]
     cpp.includePaths: exportIncludePaths

     Export {
         Depends { name: "cpp" }
         cpp.includePaths: exportingProduct.exportIncludePaths
     }

According to link https://codereview.qt-project.org/c/qbs/qbs/+/383049 
there was a change in the definition for variable 'product' inside the 
section 'Export'. Maybe then you need to display some message in the log 
about a change in behavior? I now have all the projects at work will 
fall down. People will come to me and say: "Your 'QBS' doesn't work" (I 
promote the use of QBS at my firm).
Can generally prohibit the use of variable 'product' in section 
'Export', lag behind only 'importingProduct' and 'exportingProduct'? 
Display a message about this in the log.


>
>
> Christian
>
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> https://lists.qt-project.org/listinfo/qbs



More information about the Qbs mailing list