[CMake] Bad documentation of the LINK_INTERFACE_LIBRARIES property and other transitive linking topics

Michael Hertling mhertling at online.de
Thu Nov 24 18:34:03 EST 2011


On 11/24/2011 08:20 AM, Hendrik Sattler wrote:

> BTW: linking plugins against an executable is really not good style. 
> Put the common part into a library and link the executable and the 
> plugin against that library.

Ignore the necessity or desire to load the plugin at run time for a
moment. Then, if the plugin or the common part in the executable are
candidates for being designed as ordinary shared libraries anyway, I
would agree. However, if both criteria do not apply, i.e. neither the
plugin nor the common part would be realized as a shared library with-
out the requirement to load the plugin at run time, I'd consider both
as integral parts of the executable and, thus, export the symbols of
the common part and link the shared object of the plugin against the
executable. Of course, that's just my personal opinion, and it's no
technically or otherwise coercive reason.

Regards,

Michael


More information about the CMake mailing list