FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 09-22-2012, 03:25 PM
hasufell
 
Default supporting static-libs

On 09/22/2012 05:15 PM, Luca Barbato wrote:
> On 09/03/2012 10:54 PM, Maciej Mrozowski wrote:
>> On Tuesday 28 of August 2012 02:15:40 hasufell wrote:
>>> Is there a reason not to support static-libs in an ebuild if the package
>>> supports it?
>>>
>>> It seems some developers don't care about this option. What's the gentoo
>>> policy on this? Isn't this actually a bug?
>>
>> A little remark.
>> For CMake controlled buildsystem (as you're coming here from latest dev-
>> games/simgear), there's no automatic way of building both static and shared
>> libs (simgear allows to choose just one).
>
> Complain to cmake devs, hopefully they might come up with a solution.
> (the alternative is provide a clean autotools-based build system and ask
> upstream to please keep both. Usually works nice to cover all bases and
> make all people happy ^^;
>
> lu
>

It's a matter of 15minutes work to patch a cmake build system to allow
installation of both.

You can let cmake rename targets, so you have target library "foo" and
"foostatic", but the latter will be renamed to "foo" as well.

e.g.:
add_library(foostatic STATIC foo.cpp foo.h)
set_target_properties(foostatic PROPERTIES OUTPUT_NAME foo)
add_library(foo SHARED foo.cpp foo.h)
 
Old 09-22-2012, 04:02 PM
Luca Barbato
 
Default supporting static-libs

On 09/22/2012 05:25 PM, hasufell wrote:

> add_library(foostatic STATIC foo.cpp foo.h)
> set_target_properties(foostatic PROPERTIES OUTPUT_NAME foo)
> add_library(foo SHARED foo.cpp foo.h)

Looks a bit kludgy but should work well as a macro, willing to contact
upstream and/or ask cmake devs to include it? Looks like you have a
simple solution for this problem =)

lu
 

Thread Tools




All times are GMT. The time now is 01:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org