[CMake] CMAKE -- MAKE problem -- TARGET_LINK_LIBRARIES related
Michael Wild
themiwi at gmail.com
Tue May 18 05:07:13 EDT 2010
On 18. May, 2010, at 10:46 , 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)
>
> ADD_EXECUTABLE (TestAcquireGPS TestAcquireGPS.cpp
> AcquireGPS.cpp)
> TARGET_LINK_LIBRARIES (TestAcquireGPS vtkCommon vtkRendering vtkWidgets
> vtkHybrid vtkGraphics ann lapack levmar)
>
> What am I missing ?
> Thank you in advance !
Don't use LINK_DIRECTORIES. Consider it deprecated. Specify the full path to the library instead in the TARGET_LINK_LIBRARIES call.
Michael
More information about the CMake
mailing list