MantisBT - CMake
View Issue Details
0014724CMakeCMakepublic2014-01-29 19:122016-06-10 14:31
Craig Scott 
Kitware Robot 
normalminoralways
closedmoved 
Any
CMake 2.8.12.1 
 
0014724: InstallRequiredSystemLibraries does not work with component-based installers
The InstallRequiredSystemLibraries CMake module includes code which invokes the install() command (see the end of InstallRequiredSystemLibraries.cmake). Unfortunately, it provides no opportunity to specify an install COMPONENT to be included in that, so when you use a component-based installer, the system runtime libraries cannot be pulled in. It is probably relatively simple to provide an additional CMake variable to optionally specify an install component and if that variable is non-empty, use that as the component name in the install() command. I'd propose something like CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT as the variable name, but anything that is sane (and documented!) should be fine.
Include the InstallRequiredSystemLibraries module on a platform where it makes a difference (currently only Windows with Visual Studio compilers I think). Make sure the project builds a binary linked to a runtime (eg MSVC runtime) and install that target using a COMPONENT. Then invoke the packaging as a component-based installer.
No tags attached.
Issue History
2014-01-29 19:12Craig ScottNew Issue
2014-02-03 23:22Clinton StimpsonNote Added: 0035033
2014-02-03 23:59Craig ScottNote Added: 0035034
2016-06-10 14:29Kitware RobotNote Added: 0042471
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035033)
Clinton Stimpson   
2014-02-03 23:22   
It does work with component based installers if you set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP, and make your own install() call using CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS.
(0035034)
Craig Scott   
2014-02-03 23:59   
Yes and this was my workaround, but I had to go through the .cmake source file to work that out. At the very least, a comment in the documentation noting this would be useful.
(0042471)
Kitware Robot   
2016-06-10 14:29   
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.