[CMake] CMAKE -- MAKE problem -- TARGET_LINK_LIBRARIES related

Lucian Goron luciangoron at gmail.com
Thu May 20 04:42:08 EDT 2010


Thanks for the advice !

Cheers,

2010/5/19 Alexander Neundorf <a.neundorf-work at gmx.net>

> On Tuesday 18 May 2010, Lucian Goron wrote:
> > this is my problem.. it tells me that it can not find the levmar package:
> >
> > lucian at schwarz:~/work/ransac$ make
> > Linking CXX executable TestAcquireGPS
> > /usr/bin/ld: cannot find -llevmar
> > collect2: ld returned 1 exit status
> > make[2]: *** [TestAcquireGPS] Error 1
> > make[1]: *** [CMakeFiles/TestAcquireGPS.dir/all] Error 2
> > make: *** [all] Error 2
> > lucian at schwarz:~/work/ransac$
> >
> > but, in my CMakeLists.txt file I have the following lines:
> >
> > INCLUDE_DIRECTORIES (../common/levmar)
> > LINK_DIRECTORIES (../../common/levmar)
>
> In cmake < 2.8.1, relative paths in LINK_DIRECTORIES() are interpreted as
> relative to CMAKE_CURRENT_BUILD_DIR, while relative paths in
> include_directories() are interpreted as relative to
> CMAKE_CURRENT_SOURCE_DIR.
> Since cmake 2.8.1 there is the cmake policy CMP0015 which controls this
> behaviour, if set to NEW, also in LINK_DIRECTORIES() relative paths are
> treated as relative to CMAKE_CURRENT_SOURCE_DIR.
>
> But as Michael wrote, prefer to use the full path to the library.
>
> Alex
>



-- 
MSc., Eng. Lucian GORON, PhD. Student
Robotic Research Group, Technical University of Cluj-Napoca
71-73 Dorobantilor Street, Room C24, 400609 Cluj-Napoca, Romania
0040 264 401267 (office), 0040 727 361624 (mobile)
lucian.goron at aut.utcluj.ro
rrg.utcluj.ro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100520/debdccb8/attachment.htm>


More information about the CMake mailing list