[Cmake] Problems with Library Dependencies

William A. Hoffman billlist at nycap.rr.com
Wed, 07 Apr 2004 09:32:54 -0400


Add it as a feature request in the bug tracker.
However, I am a bit confused by your comment that your source
is too big for one Makefile.   You can have SUBDIRS in cmake, and
as long as the ADD_LIBRARY is within the project all the depend stuff
will work just fine.   Is the library you are finding built by cmake?

-Bill


At 02:01 AM 4/7/2004, Bernhard Zach wrote:
>Are there plans for changing this behavior?
>
>We would really need such a feature, because our source is too big to build
>it all in one Makefile.
>
>At least a FIND_LIBRARY/ADD_DEPENDENCIES combination should work.
>
>Thanks for your help,
>Bernhard
>
>-----Original Message-----
>From: cmake-admin at www.cmake.org [mailto:cmake-admin at www.cmake.org] On Behalf
>Of William A. Hoffman
>Sent: Tuesday, April 06, 2004 1:57 PM
>To: Bernhard Zach; cmake at www.cmake.org
>Subject: Re: [Cmake] Problems with Library Dependencies
>
>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 
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake