[CMake] Replacing -L with -l

Jorgen Bodde solidstl at xs4all.nl
Fri Jun 9 12:50:57 EDT 2006


Hi Philip,

Thanks for the info. The problem is that wx-config outputs a whole lot 
of flags including the /usr/lib .. /usr/lib contains a lot of libs I 
need so I think I will have to make shortcuts to them all ..

But, it sounds doable! Thanks!

- Jorgen

Phillip Hellewell wrote:
> On 6/9/06, *Jorgen Bodde* <solidstl at xs4all.nl 
> <mailto:solidstl at xs4all.nl>> wrote:
> 
>     Hi Alex,
> 
>     Thank you for your reply. I want to statically link as much libs as
>     possible (especially wxGTK2.6.3) .. The reason is that my app needs to
>     distributed. When I have wxGTK2.6.1 installed in /usr/lib it always
>     takes those instead of my own absolute path.
> 
>     I do not really mind if it is portable or not, I just want GCC to take
>     the proper libraries. And I feel limited now because I do have wxGTK
>     2.6.1 installed as RPM (in /usr/lib) because it is needed by some apps,
>     but I cannot even link against my own built wx-libs (located somewhere
>     else) because GCC always takes the .so versions in /usr/lib. To me that
>     sounds rather limiting.
> 
> 
> Here is a trick I learned.  Just make a directory, for example 
> /usr/lib/static, and create symbolic links in there that point to the 
> libraries you want to link statically.
> 
> Then all you need is a LINK_DIRECTORIES( /usr/lib/static ), and thenit 
> will pick those static libraries first.
> 
> Phillip Hellewell


More information about the CMake mailing list