Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] supporting static-libs
Date: Sat, 22 Sep 2012 15:26:17
Message-Id: 505DD857.6040207@gentoo.org
In Reply to: Re: [gentoo-dev] supporting static-libs by Luca Barbato
1 On 09/22/2012 05:15 PM, Luca Barbato wrote:
2 > On 09/03/2012 10:54 PM, Maciej Mrozowski wrote:
3 >> On Tuesday 28 of August 2012 02:15:40 hasufell wrote:
4 >>> Is there a reason not to support static-libs in an ebuild if the package
5 >>> supports it?
6 >>>
7 >>> It seems some developers don't care about this option. What's the gentoo
8 >>> policy on this? Isn't this actually a bug?
9 >>
10 >> A little remark.
11 >> For CMake controlled buildsystem (as you're coming here from latest dev-
12 >> games/simgear), there's no automatic way of building both static and shared
13 >> libs (simgear allows to choose just one).
14 >
15 > Complain to cmake devs, hopefully they might come up with a solution.
16 > (the alternative is provide a clean autotools-based build system and ask
17 > upstream to please keep both. Usually works nice to cover all bases and
18 > make all people happy ^^;
19 >
20 > lu
21 >
22
23 It's a matter of 15minutes work to patch a cmake build system to allow
24 installation of both.
25
26 You can let cmake rename targets, so you have target library "foo" and
27 "foostatic", but the latter will be renamed to "foo" as well.
28
29 e.g.:
30 add_library(foostatic STATIC foo.cpp foo.h)
31 set_target_properties(foostatic PROPERTIES OUTPUT_NAME foo)
32 add_library(foo SHARED foo.cpp foo.h)

Replies

Subject Author
Re: [gentoo-dev] supporting static-libs Luca Barbato <lu_zero@g.o>