[QBS] dynamic library target name on mac osX

Jake Petroules jake.petroules at petroules.com
Thu Sep 18 12:20:10 CEST 2014


Hi Olivier,

I understand. Keep in mind that building a dynamic library does create symlinks without a version number, so that may work for you.

Alternatively, you can set the cpp.internalVersion and cpp.shouldCreateSymlinks properties to false (these are not documented) to remove the version number from the dylib file name. Currently this will work despite the fact that the properties are marked readonly, though I can't guarantee that it will continue to because it is undocumented and unsupported for now.

The shouldCreateSymlinks property should also check internalVersion instead of product.version so you don't need to set that one explicitly if you set internalVersion to undefined -- there's the fix for that: https://codereview.qt-project.org/#/c/95200/
-- 
Jake Petroules - jake.petroules at petroules.com
Chief Technology Officer - Petroules Corporation

On 2014-09-18, at 04:08 AM, olivier musse <olivier.musse at sfr.fr> wrote:

> Le 17/09/2014 20:47, Jake Petroules a écrit :
>> On 2014-09-17, at 11:33 AM, olivier musse <olivier.musse at sfr.fr> wrote:
>> 
>>> Hi,
>>> 
>>> On mac os X when compiling a dynamic library, the target name is
>>> automatically prefix with lib and postfix with version number.
>>> It is possible to change the prefix using cpp.dynamicLibraryPrefix (not
>>> documented) but we found nothing (exception modifying path-tools.js
>>> file) to not append the version number.
>>> Is there any solution to do that properly using a cpp module property or
>>> something else than hacking path-tools.js file?
>>> If not, is it possible to imagine that as a feature for a next QBS version?
>>> 
>>> Many thanks for help.
>>> 
>>> Regards
>>> 
>>> Olivier
>>> 
>>> 
>>> _______________________________________________
>>> QBS mailing list
>>> QBS at qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/qbs
>> I cannot imagine a valid use case for doing this -- could you explain why you need it?
>> 
>> If you set the product's version property to undefined then there will be no version number appended, but I would not recommend you use this since the version property is multi-purpose and does more than just append it to the filename.
> Hi Jake,
> 
> As always, we are doing very specific things :o)
> 
> Well this is always the same specific case where we are developing plugins for a software (http://www.4d.com/). Plugins are dynamic libraries (on mac and windows) with specific names (should be the same on windows and mac with a specific extensions .4DX). ... well there are many constraints and one is that no version must be appended in name. And as you said we do not want to loose all advantages of specifying a version to the product.
> 
> Regards
> 
> Olivier
> 
> 
> 
> 




More information about the Qbs mailing list