Refactor cmake big function in roseus_catkin.cmake