Fix various dependency issues in the CMakeLists.txt and package.xml files