If we are talking about C++ then the problem is that there a too many build systems and all of them are incompatible.
CMake is quite popular (and maybe most popular) but it's a complete horror in comparison to other build systems, especially for other languages (like Cargo for Rust).
If you need some specific example: try to add a git-based dependency with a specific branch in CMake.