Open Hugal31 opened 4 years ago
Can you please elaborate how you would like to use that new arguments. E.g. what would you like to pass and in which cases.
Please consider to contribute a pull request for this feature idea.
For instance, if I want my component to be installed in a separate component (e.g. I use CPack to package my app in multiple .deb files), I could do :
catkin_package(
# ...
INSTALL_COMPONENT myComponent
)
# ... somewhere in catkin cmake internal files, for instance caktin_package.xml
set(_install_component_arg)
if(PROJECT_INSTALL_COMPONENT)
set(_install_component_arg COMPONENT ${PROJECT_INSTALL_COMPONENT})
endif()
# install package.xml
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/package.xml
${_install_component_arg}
DESTINATION share/${PROJECT_NAME}
)
CMake's install command supports the COMPONENT keyword since at least version 3.0. Since catkin uses the install command itself to install package.xml, the .pc file and others, it would be nice to allow the user to specify the component, for example via a parameter of catkin_package.