[QBS] Specifying static runtime libraries with MSVC

Thomas Epting thomas.epting.stryker at gmail.com
Wed Oct 29 09:12:17 CET 2014


> > Now I think of adding an appropriate option to Qbs.
>
> There was already a bit of discussion going on in QBS-570.
> I'll add a comment there.

Thank you. I've added another comment regarding MSVC.

Here's my current test implementation (applied to Qbs 1.3):

*--- CppModule.qbs* ---

166a167,173
>     property string runtimeLibrary
>     PropertyOptions {
>         name: "runtimeLibrary"
>         description: "determine runtime library to use"
>         allowedValues: ['default', 'static', 'dynamic']
>     }
>

*--- msvc.js* ---

24,26d23
<         args.push('/MDd')
<     } else {
<         args.push('/MD')
27a25,32
>
>     // runtime library
>     var runtimeLibrary = ModUtils.moduleProperty(product,
"runtimeLibrary")
>     if (runtimeLibrary && runtimeLibrary === 'static')
>         args.push('/MT' + (debugInformation ? 'd' : ''))
>     else
>         args.push('/MD' + (debugInformation ? 'd' : ''))
>

Regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20141029/da44dfe6/attachment.html>


More information about the Qbs mailing list