Sort and add missing dependencies
Fix cmake