[CMake] long library names
James Bigler
bigler at cs.utah.edu
Wed Aug 15 16:11:36 EDT 2007
Alexander Neundorf wrote:
> On Wednesday 15 August 2007 14:42, James Bigler wrote:
>> When I run FIND_LIBRARY(MYLIB mylib), the value of MYLIB is the full
>> path to mylib (i.e. /home/bigler/lib/libmylib.a). When I go to link
>> the executable it breaks it up into -L/home/bigler/lib -lmylib.
>>
>> Is there a way to get CMake to put /home/bigler/lib/libmylib.a on the
>> link line instead of breaking it up into path/short name?
>
> No. Why do you need this, it shouldn't be necessary ?
It is necessary on the Mac. GCC on Macs will search *all* the library paths for
a shared version of the library, then search again for a static version. Since
a shared version exists in the default path, /usr/lib, no amount of -L/mypath
will get it to pick the static version unless I specify the static library
explicitly.
There was another thread about this shared library issue a couple of days ago.
Thanks,
James
More information about the CMake
mailing list