I made a no-bullshit package manager for C and C++, called cpak. It doubles as a package manager and build system, and you can install, use, and build with a package in 3 commands.
I also had to make the online package repository for it, which stores a file inside each package that says where the necessary build files are. cpak automatically and robustly adds all dependencies to the build command.
For example, installing and building with raylib is simply
cpak install raylib
cpak use raylib
(this makes the current working directory able to use raylib)cpak build my_raylib_project.c -o my_raylib_exe.exe