[CMake] link library paths
Andreas Pakulat
apaku at gmx.de
Thu Feb 2 18:35:49 EST 2012
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
More information about the CMake
mailing list