[Qbs] How to make 'cpp.link: false' part of the Export item within custom item?
resurrection at centrum.cz
resurrection at centrum.cz
Sun Oct 22 08:24:33 CEST 2017
Having a custom Item I would like to disable linking to the dynamic library for all those that depend on it since it is a plugin just like what Jake talks about in the 1.9 release blog <http://blog.qt.io/blog/2017/09/05/qbs-1-9-released/>. Qbs generates the warning that cpp.link property was not declared when I place it in the Item's Export child item and the compilation fails with missing lib file. Simplified:
MyPluginItem.qbs
DynamicLibrary
{
Export
{
Depends { name: "cpp" }
cpp.link: false //<---- warning
}
Depends { name: "cpp" }
}
MyProject.qbs
Project
{
MyPluginItem
{
name: "MyPlugin"
}
QtApplication
{
Depends { name: "MyPlugin" } //<---- does not work, compilation fails with missing MyPlugin.lib
Depends { name: "MyPlugin"; cpp.link: false } //<---- works
}
}
Is there a way to prevent the linking from the plugin's side short of dropping dependency on the cpp module? I was looking throughout the docs and the cpp.link flag seems the the best option albeit unavailable in the Export item.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171022/3207b738/attachment.html>
More information about the Qbs
mailing list