[CMake] How is GetPreRequisites used?

David Cole david.cole at kitware.com
Tue Oct 28 16:47:29 EDT 2008


You are not being stupid. It does need to be used at installation time to be
useful.
The intent is to analyze a given built executable to determine the required
set of (possibly 3rd-party, possibly built elsewhere on the build machine)
libraries that it needs to run. Then, given that set, you need to make sure
that you have install rules to cover all of those libraries.

The first working example of its use is in the ParaView code base where it
is used to copy libraries into ParaView's Mac bundle application. It is used
in conjunction with BundleUtilities.cmake to "fix up" the bundle app so that
it is standalone and contains all of its referenced libraries in the bundle
directory structure. Then the bundle can be copied to any directory or to
another Mac and it should all "just work."

Having said that, there is more work to be done to make this a genuinely
easy to use feature of CMake. I envision being able to do the same thing at
make install time for Linux and Win32 builds, but according to the
conventions of those platforms. Dlls copied into the same dir with the exe
on Win32 and "whatever's appropriate" on Linux builds... (Feel free to make
suggestions.)

So... ideally it would all just work automatically and all you would have to
do in CMake is add an install rule for your executable and call a
post-install script that copies/fixes up libraries appropriately in a
platform-independent manner.

Thanks for asking questions / contributing to the discussion / improving
this development feature of CMake.....

  David


On Tue, Oct 28, 2008 at 7:36 AM, Mike Arthur <mike at mikearthur.co.uk> wrote:

> Perhaps I'm just being stupid but I can't see how this can be used as it
> needs
> to be called at installation time and I'm not aware that modules can be?
>
> Does anyone have a working example of how to install its outputted
> libraries?
> --
> Cheers,
> Mike Arthur
> http://mikearthur.co.uk/
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081028/e47db5a9/attachment.htm>


More information about the CMake mailing list