[Cmake] Problems with Library Dependencies

William A. Hoffman billlist at nycap.rr.com
Tue, 06 Apr 2004 07:56:37 -0400


CMake only depends on libraries that it can build.   You can
link other libraries, but right now it does not depend on them.
So, if there is not an ADD_LIBRARY in the project, the library
will not be in the DEPEND_LIBS.

-Bill


At 04:17 AM 4/6/2004, Bernhard Zach wrote:
>Hi all,
>I hope somebody could help me:
>
>It seems that the Makefile generators have Problems to generate correct
>Library dependencies. 
>The line in the Makefile looks like this:
>myprog_DEPEND_LIBS =
>
>In my CMakeLists.txt:
>FIND_LIBRARY(LibFile mylib ${path1} ${path2})
># do some error checking here...
>
># link the library with absolute path to my binarie
>TARGET_LINK_LIBRARIES (myprog ${LibFile})
>
>The only way I got something in my "myprog_DEPEND_LIBS" is, when the "mylib"
>is build at the same time (both dirs with SUBDIR-Command)
>
>I've tried it under Linux and Windows(nmake).
>I also played with the ADD_DEPENDENCIES-Command with no result.
>
>Did I misunderstood something from the Cmake-concept?
>
>Thanks for some help,
>Bernhard
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake