[CMake] cpack & components problem

Clinton Stimpson clinton at elemtech.com
Tue Dec 3 13:40:52 EST 2013


I have a situation where I'm generating a NSIS installer and I set 
CPACK_COMPONENTS_ALL to pick a few components I want to include.

I use one component name for all my executables and shared libraries, and 
there is a 3rd party library (hdf5) that uses a different component name for 
installing shared libraries.  There is not a way to customize the installation 
of hdf5 to set the component name, and there is there a way to disable the 
install() commands.

I also want to run BundleUtilities to make sure my packages include dependent 
libraries.  To do so, I have to pick a component name to run BundleUtilities 
with an install() command.

But, the problem I have is the NSIS generator separates each component into 
its own directory and combines the results into the one and final .exe 
installer.  BundleUtilities fails because the files are not in the same 
directory.  Even if I try component groups, the NSIS generator still separates 
them by component name rather than by group.

Can we have the cpack generators be consistent in how the components are 
installed?  I'm thinking of installed components going into the same directory 
if they are in the same group, or in the same package file.  Then, is there a 
good way to have cpack run a script like BundleUtilities after multiple 
components are installed in a certain directory?

Or should the hdf5 cmake files be modified to allow people to override the 
install component names?  This is what I have done for now.

Clint



More information about the CMake mailing list