[CMake] link library paths
Alex Olivas
olivas at icecube.umd.edu
Fri Feb 3 05:01:11 EST 2012
On 02/03/2012 12:43 AM, Andreas Pakulat wrote:
> 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)
Ah right. Missed that.
>> 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.
So I switched back to 2.8.2 and commented out the line that sets
the shared-lib prefix and it works. Then I added the following line
to get the name right :
set_target_properties(python_qt PROPERTIES PREFIX "")
...which I think is much better ( and likely preferred ) and works
with both versions.
Thanks for the help,
Alex.
More information about the CMake
mailing list