[CMake] Replacing -L with -l
Jorgen Bodde
solidstl at xs4all.nl
Fri Jun 9 06:35:30 EDT 2006
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.
Is there any way to circumvent this? I did check the mailing lists but
did not find any answer.
With regards,
- Jorgen
Alexander Neundorf wrote:
>> Von: Jorgen Bodde <solidstl at xs4all.nl>
>>
>> Hi all,
>>
>> Is there any feature in CMake (Linux / Suse 10) that replaces e.g.
>>
>> /home/jorg/src/scintilla/lib/libscintilla.a
>>
>> in TARGET_LINK_LIBRARIES with
>>
>> -L/home/jorg/src/scintilla/lib/ and -lscintilla ?
>
> Yes.
>
>> If so how can I disable this? The reason is that if the latter notation
>> is used, and a scrintilla.so is found before a libscintilla.a it takes
>> the wrong one. I would like it to have the first notation towards GCC.
>> This has given me headaches as it also took the wrong version of
>> wxWidgets all the time instead of the .a files I pointed out.
>
> Please have a look at the list archive, this has been asked several times. IIRC this is not really possible in a portable way. But I may be wrong.
>
> Alex
>
More information about the CMake
mailing list