Collaboration in a project with dependencies

  alm, c++, dependencies, devops

I’m a DevOps engineer creating CI processes for projects. I was wondering what is the best way to deal with the following scenario: Let’s say I have a C++ project (using CLion + CMake) with several developers working on it. Now in order to be built, the project has some libraries it depends on. That automatically reflects on the CMakeLists.txt file that should know where to look for those libraries.

Basically the problem is that we need to take care that every developer has these libraries in the correct paths on his machine, which is a big hassle.

One approach to handle this would be to keep those dependencies in the repository. That’s great since all the developer has to do is to clone the repo and he got everything he needs in order to run compilation. But as we know, keeping binaries in SCM is not a good practice.

The question is, is there a good method to handle project dependencies in a C++ project?

I know that with C# for example, we could use NuGet packages to handle these kind of scenarios. So we’d have a NuGet repository in Artifactory that would host the dependency packages, and then in our project we’d keep a reference to the required packages, and in build time we would just download the dependecies and build the project.
Is there something alike in C++ (Running on Linux I mean)?

Hope the question is clear enough lol, had a hard time wording it..

Source: Windows Questions C++