Using cmake language, say I create a target foo
, and link it to libbar.so
. libbar.so
was already compiled on a different platform with a cmake PRIVATE depedency on libbaz.so
. So the dependency chain is
foo ----> libbar --(PRIVATE)--> libbaz
Does libbaz.so
need to be present on the system when I compile foo
and link it with libbar
? My understanding is that I can compile and link foo
without libbaz
, and then find libbaz
at foo
s runtime on a different platform using LD_LIBRARY_PATH
. In other words, my hunch is that libbaz
is only a runtime, and not compile time dependency.
But my current design for a large build system is dependent on this hunch being correct, so I want to double check.