Fixing cmake dependencies