[cmake-developers] CPack Packaging and BundleUtilities/GetPrerequisites

Mike McQuaid mike at mikemcquaid.com
Thu Jan 6 10:42:09 EST 2011


Hey,

Following on from this issue: http://www.vtk.org/Bug/view.php?id=11142

I love CPack and try to use it in almost every CMake project I work
on. The biggest problem I've had is it's interaction with
BundleUtilities/GetPrerequisites. In my workflow I always find that on
Mac and Linux you don't want to use BundleUtilities when using "make
install", only when using "make package" or "cpack".

There doesn't seem to be any easy way to do this. I'm currently using
"INSTALL(CODE)" with "IF( \${CMAKE_INSTALL_PREFIX} MATCHES
.*/_CPack_Packages/.*" but this means I need to fight with escaping.

It would be great if there was a way you could use components or
INSTALL(...PACKAGE) or something to be able to install certain things
only at package time and maybe a way of running FIXUP_BUNDLE only at
package time (and it handles all the escaping for you) rather than
having to use INSTALL(SCRIPT) or INSTALL(CODE).

I'm happy to work on a patch for this if I've given some direction as
to what would get accepted.

Anyone else agree or disagree with me here?

-- 
Mike McQuaid
http://mikemcquaid.com



More information about the cmake-developers mailing list