[CMake] link library paths

Alex Olivas olivas at icecube.umd.edu
Thu Feb 2 20:37:03 EST 2012


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?
Or is there something wrong with my cmake file, other than
the use of link_directories?
Thanks,
Alex.


On 2/2/12 4:35 PM, Andreas Pakulat wrote:
> On 02.02.12 11:51:11, Alex Olivas wrote:
>> I'm trying to link to libraries located in /usr/lib.  This
>> is a very simple example using boost::python and Qt.
>>
>> Here's my cmake file : http://codepad.org/tZxBzXVP
>>
>> I added the link_directories command only after the initial
>> link failed.
> Using link_directories is almost always wrong. Especially for a standard
> directory like /usr/lib. Also Boost_INCLUDE_DIRS is most certainly not a
> directory containing shared libs.
>
> Can you post the linker line without link_directories? Maybe also try to
> remove the unsetting of the shared-lib prefix. The linker-line you
> posted is wrong, but normally CMake will use absolute paths in the
> linker-line, so something causes it to not do this.
>
> Andreas
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list