[CMake] Gathering up required shared libraries

Gregory Crosswhite gcrosswhite at gmail.com
Tue Aug 2 19:47:35 EDT 2011


On 8/2/11 4:32 PM, Clinton Stimpson wrote:
> There is no scanning the file system to find which libraries to fix up.
> Any libraries used by executables will be considered in the set of libraries
> to fix up, regardless of where they are installed (in bin/ or lib/).  Any
> libraries not found as a dependency can be specified by the second parameter of
> fixup_bundle().  Plugins are a typical example of that, because executables and
> libraries don't link against plugins.

Doh!  For some reason I thought I saw that the code was doing that but I 
see now that I was mistaken.

> You don't need to add your libraries to the second parameter.  If you did,
> you'd have to know them all up front, and that defeats one of the purpose of
> BundleUtilities.

Sorry, I obviously didn't make it clear that I was referring to 
libraries that I was not planning on linking the program against --- 
that is, libraries provided for the benefit of other developers but not 
actually used by my program.  Having said that, discussing this has made 
me realize that in my case it would probably make more sense for me to 
link against my own shared library anyway to prevent code from being 
duplicated in both program and library, so my use case is not as likely 
as I had been originally imagining.

> If you copy BundleUtilities/GetPrerequisites and remove the FATAL_ERROR
> issued.  Then the installation is fixed up correctly, including the libraries
> in lib/.  The fix for this bug is to modify that error check.
>

Okidoke, that sounds easy, and you obviously know what's going on better 
than me so I'll just run with that solution until it gets fixed in the 
mainline.

Thank you very much for your help!!!  :-)

Cheers,
Greg


More information about the CMake mailing list