MantisBT - CMake
View Issue Details
0009846CMakeCPackpublic2009-11-05 11:112016-06-10 14:31
mrtman 
Kitware Robot 
normalminoralways
closedmoved 
CMake-2-6 
 
0009846: CPACK_PACKAGE_EXECUTABLES creates start menu shortcuts for components that are not selected to be installed
Using CPack to create NSIS installer, CPACK_PACKAGE_EXECUTABLES always creates Windows start menu shortcuts for all components. Even those that are not selected to be installed.
No tags attached.
Issue History
2009-11-05 11:11mrtmanNew Issue
2009-11-05 14:39Bill HoffmanStatusnew => assigned
2009-11-05 14:39Bill HoffmanAssigned To => David Cole
2010-12-17 07:41David ColeTarget Version => CMake 2.8.4
2011-01-10 15:23David ColeNote Added: 0024554
2011-01-10 15:23David ColeTarget VersionCMake 2.8.4 =>
2011-10-25 22:25David ColeStatusassigned => backlog
2011-10-25 22:28David ColeAssigned ToDavid Cole =>
2016-06-10 14:27Kitware RobotNote Added: 0041611
2016-06-10 14:27Kitware RobotStatusbacklog => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:27Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0024554)
David Cole   
2011-01-10 15:23   
Unfortunately, this turns out to be non-trivial to fix, and I do not have enough time to fix it for CMake 2.8.4 -- I am unsetting the target version field, and we'll have to defer this one until later, if ever...

The problem is:
- CPack is aware of the list of components described to it... but it has no knowledge of what files are installed in what component -- that knowledge is available to CMake, but not easily accessible from CPack as-is right now.
- CPACK_PACKAGE_EXECUTABLES is a variable that pairs references to executable files under the CPACK_NSIS_EXECUTABLES_DIRECTORY with display text for their Start Menu items. It knows nothing about components because it pre-dates them.

Unfortunately, this means that you'd have to write code in the NSIS script to this effect:
if (executable file is in component 'x')
  if (installing component 'x')
    CreateShortCut ... for executable file

if (uninstalling executable file)
  Delete (shortcut to executable file)

If there were an easy way to do this, I'd do it... but it doesn't look to me like there is one, and I've run out of time to spend on this before 2.8.4...
(0041611)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.