[CMake] linker dependencies

David Blado dblado at decarta.com
Wed Jun 20 18:22:22 EDT 2007


Hi All,

I'm guessing this has come up before, but I can't seem to find much from
google on it.

I've got a shared library(A) that links (statically) against db/db_cxx
(Berkeley DB).  I have other shared libraries (B, C, D) that link
against shard library A.

When I run and build w/ CMake, libraries B, C, and D are requiring to
link against db/db_cxx for both windows and unix and I can't determine
why.  Does this mean that somewhere in libraries B, D, and D I am
including db.h/db_cxx.h.  I went through all of library A's code and
wrote the appropriate classes to encapsulate BDB related calls full
within library A.

Given this, I'm puzzled as to why CMake believes that libraries B, C,
and D need to link against db/db_cxx.  If I pull out the link line and
remove db/db_cxx, B, C, and D link just fine (the same is true for linux
and windows).

Can anyone describe to me what is happening here?

Cheers,
David


More information about the CMake mailing list