[CMake] link library paths

Andreas Pakulat apaku at gmx.de
Fri Feb 3 02:43:30 EST 2012


On 02.02.12 18:37:03, Alex Olivas wrote:
> I don't know what the issue was, but it's fixed in a later version.
> I upgraded from 2.8.2 to 2.8.7 and the problem went away.
> 
> So when you say my linker-line is wrong, you mean in the
> verbose output there's no '-L/usr/lib' passed to ld, right?

No, the error is to use -llibfoo, the linker then searches for a file
called liblibfoo.so which does not not exist. But as I said, if you pass
absolute paths to CMake it usually uses them (I'm not sure right now
about that when the directory is a system-link-directory)

> Or is there something wrong with my cmake file, other than
> the use of link_directories?

My guess would've been for the setting of the shared-lib prefix, maybe
thats whats causing the older CMake version to generate a -llibfoo
argument for the linker.

Andreas



More information about the CMake mailing list