[cmake-developers] [DISCUSSION] Using COMPONENTs for CMake install(...)?

Konstantin Podsvirov konstantin at podsvirov.pro
Thu Dec 4 00:59:50 EST 2014


Hi, Brad! You always understand me right :-)

03.12.2014, 18:48, "Brad King" <brad.king at kitware.com>:
> On 12/02/2014 04:50 PM, Konstantin Podsvirov wrote:
>> The command install(...) allows you to specify the COMPONENT.
>> Why this feature is not used by CMake?
>
> It simply never came up before. There is no reason not to
> define components for CMake''s installation. What set of
> components do you propose?
>
> -Brad

I wondered at the expense of use of the components.
I thought that there might be problems with some CPack generators.
Well, that is no problem.

The idea of splitting into components appeared when creating a graphical installer for CMake.
Although CMake now does not use IFW generator for distribution, I'm working on improving it.

03.12.2014, 23:36, "Brad King" <brad.king at kitware.com>:
> On 12/03/2014 03:20 PM, Alexander Neundorf wrote:
>> you can use them when calling the cmake_install.cmake manually, instead of
>> calling "make install": cmake-DCOMPONENT="MyComponent" -P cmake_install.cmake
>>
>> I think at least some of the package generators support the components too.
>
> I don't think the question is about how to use install components
> in general, but instead about teaching CMake''s own source tree to
> use them. See my response sibling.

Yes! In the source tree, you can see some of the components.
For example:
-- tools
 - cmake
 - cpack
 - ctest
-- scripts
 - modules
 - templates
-- documentation
 - manual
  * html version
  * man pages
-- according to
 - Qt (only necessary)

In the graphical installer, the user will be able to see the components of which consists CMake set.
The user will not be able to install an optional component, if it is not needed (such as manual).

Also I suggest to add in CMakeLists.txt option to control the installation of dependencies with CMake.
For example the Qt library. This happens on Windows and Mac, but I think it is not always necessary in Linux.

Regards,
Konstantin Podsvirov


More information about the cmake-developers mailing list