Fixed a bug in the cmake and removed an unnecessary dependency on moveit