cmake can describe components of project and install by one. I need to get a list of components in current project.
I can insall one component of a cmake project by run cmake --install . --component <name>
Is there a way for lists all compoents in a cmake poject?
Something like
cmake --install . --list-components
return
<name1>
<name2>
<name3>
...
cmake can describe components of project and install by one. I need to get a list of components in current project.
I can insall one component of a cmake project by run cmake --install . --component <name>
Is there a way for lists all compoents in a cmake poject?
Something like
cmake --install . --list-components
return
<name1>
<name2>
<name3>
...
Share
Improve this question
asked Feb 5 at 6:04
VasiliiVasilii
211 bronze badge
1 Answer
Reset to default 0Search all CMakeLists.txt file for COMPONENT
and the name after it is a installable comonent.
Components are explicitly defined for install
command by adding COMPONENT <component_name>
.