[Cmake] Problems with Library Dependencies
Bernhard Zach
bzach at hyperwave.com
Tue, 6 Apr 2004 10:17:57 +0200
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