[Qbs] Failed 'PackageBuild' product on QBS 1.22

Christian Kandeler christian.kandeler at qt.io
Thu May 5 11:14:45 CEST 2022


On 5/5/22 11:00, Карелин Павел wrote:
>
>
> 05.05.2022 10:47, Christian Kandeler пишет:
>> On 5/4/22 18:18, Карелин Павел wrote:
>>> Christian, how would you solve my problem?
>>> After the project is built, the deb-package is assembled. To build 
>>> the deb-package, you need a list of dependent libraries (not all, 
>>> only parts, system dependencies no required). For example this list:
>>>
>>> /opt/ffmpeg/4.4/lib/libavutil.so*
>>> /opt/ffmpeg/4.4/lib/libswscale.so*
>>> /opt/ffmpeg/4.4/lib/libswresample.so*
>>> /opt/opencv/4.5.5/lib/libopencv_core.so*
>>> /opt/opencv/4.5.5/lib/libopencv_calib3d.so*
>>> /opt/opencv/4.5.5/lib/libopencv_imgproc.so*
>>>
>>> I can get library paths and names of so-modules from dependencies:
>>>
>>> Depends { name: "lib.ffmpeg" }
>>> Depends { name: "lib.opencv" }
>>>
>>> How can I create such a list and put it in the package_build_info 
>>> file? With the rules?
>> lib.ffmpeg and lib.opencv are modules in your projects?
> Yes, they are modules. I use my own QBS-extensions to include 
> third-party assembled libraries in my projects 
> (https://github.com/hkarel/QbsExt/tree/master/modules/lib).

Then I think the correct way is to

     - collect these libraries in a Group in the respective module

     - mark them as target artifacts (see 
https://doc.qt.io/qbs/qml-qbslanguageitems-group.html#filesAreTargets-prop)

     - give them a suitable tag

     - on the consuming side, create a rule whose inputsFromDependencies 
matches that tag and in this rule, do whatever you need to do.


Christian



More information about the Qbs mailing list