[CMake] using install() with EXCLUDE_FROM_ALL

Michael Wild themiwi at gmail.com
Fri Apr 9 02:08:41 EDT 2010


On 8. Apr, 2010, at 16:40 , David Cole wrote:
[...]
> 
> 
> Why not use the COMPONENT feature of the various install command signatures to separate your installables into components...?
> 
> Then you can run:
>   cd binary_dir
>   cmake -D COMPONENT=MyComponent -P cmake_install.cmake
> and that will run just the install rules associated with the COMPONENT MyComponent...
> 
> You could even add a custom target named "install_my_component" to do this via "make install_my_component" if you like...
> 
> HTH,
> David
> 

It would be nice if CMake created component-wise install targets. E.g. it would be very nice to have:

make install-man
make install-bin
make install-shlibs
make install-dev

While this is only syntactic sugar, it would be so much more intuitive than running the cmake_install.cmake script with the appropriate arguments. Also, AFAIK this isn't mentioned anywhere in the docs, only in the wiki.

Michael


More information about the CMake mailing list