I am working with C++ in a Linux/ Unix environment. I am trying to learn the physical design of large scale projects. In one of my projects, I am using an SDK from a camera manufacturer. They released a new version of this SDK and one of the applications I had built based on the previous version stopped working because the SDK had undergone some restructuring and changes. I fixed this by making changes on my code. This was not production level code and was only for research.
Recently I came across another project that had a folder for a specific gcc-build
inside its root directory. When I checked the CMakeLists.txt
, it looked like it was setup to use whatever tools where available inside this folder.
In the first case, should I have configured my
cmake
and other associated tools to ensure that the right version of SDK was shipped (to other researchers)? It looks like I could have used either of the two approaches here:Use a script that ensures that a specific version of SDK is downloaded and installed prior to building my code. Ensure that the user runs this script in their system.
Grab all the library files I need from the
SDK
and provide it inside my project folder, askingcmake
to use specifically these files.
Which of the two is the right approach? If it is the second approach, do the SDK library files go in
lib
directory inside the project root folder?In the second case, is it a bit extreme to include a specific
gcc-build
? Or is it a common practice to ensure that things don't break?In the case of shared library files, doesn't keeping and shipping separate copies partially beat the purpose of having shared libraries? Isn't one of the ideas to use one set of files throughout the system and avoid shipping bulky code?