[CMake] link library paths

Alex Olivas olivas at icecube.umd.edu
Thu Feb 2 13:51:11 EST 2012


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.

The docs say this is rarely needed since find_package returns
absolute paths and these should be passed to target_link_libraries.
As far as I can this is exactly what FindQt4 returns and is
what's passed to target_link_libraries.  Here's the output
of the link command : http://codepad.org/lZg8N3l0

Output of the message commands :

Running CMake to regenerate build system...
QT_LIBRARIES = /usr/lib/libQtGui.so;/usr/lib/libQtCore.so
QT_LIBRARY_DIR = /usr/lib

Any ideas?
Thanks,
Alex.


More information about the CMake mailing list