[CMake] using install() with EXCLUDE_FROM_ALL
Michael Wild
themiwi at gmail.com
Fri Apr 9 15:24:07 EDT 2010
On 9. Apr, 2010, at 13:14 , David Cole wrote:
> On Fri, Apr 9, 2010 at 2:08 AM, Michael Wild <themiwi at gmail.com> wrote:
>> [...]
>> 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.
>>
>>
> I agree wholeheartedly.
>
> Do you have time to prepare a patch that implements this feature?
> (Or at least to make a feature request in the bug tracker referencing this
> thread...?)
>
> :-)
Something like this?
http://github.com/themiwi/CMake/commits/patches/componentInstallTargets
Had to wrap some code in a loop, which is why you best look at the diff ignoring whitespace differences (git diff -w). Also, I had to change some interfaces. I wonder whether the other GetInstall*TargetName functions should also be adapted for consistency (that is, their return-type to be changed from const char* to std::string)
The thing missing so far are the tests...
The corresponding ticket: http://public.kitware.com/Bug/view.php?id=10531
Michael
More information about the CMake
mailing list