Answer the question
In order to leave comments, you need to log in
How to organize the storage of libraries and headers on which our project depends?
We develop various libraries in C++.
We store the library code in the repository.
But almost always, libraries have dependencies.
CURL, POCO, OPENSSL, BOOST, ASTERISK, PJSIP, etc.
How to properly organize the storage of auxiliary libraries so that each time you can build a version of your lib from the repository that will use a specific version of dependent libraries. Do not put them all in our repository.
Now we use a network folder with approximately the following structure
S:\_SharedLib\BOOST\boost_1_57_0
S:\_SharedLib\BOOST\boost_1_60_0
S:\_SharedLib\POCO\1.6.0
S:\_SharedLib\POCO\1.4.7
S:\_SharedLib\OPENSSL\openssl-1.0.2a
S: \_SharedLib\OPENSSL\openssl-1.0.2e
S:\_SharedLib\OPENSSL\openssl-1.0.2f
Answer the question
In order to leave comments, you need to log in
And so that the history is kept, so that we can take the version of our library for the last year and quickly build it with all the dependencies. Now we use a network folder simply.
svn:externals
. Git and Mercurial also probably have it, but hardly CVS. .svn
. You can do it differently.
Use a script, with dependencies, or just paste it into the Makefile as a separate target so that all dependencies can be pulled.
Or use submodules -
https://git-scm.com/book/ru/v1/Инструменты-Git-Подмодули
CMake will solve most of your problems:
https://cmake.org/cmake/help/v3.6/command/find_pac...
CMake:How To Find Libraries
Most - except for the problem of installing/managing dependent libraries. Those. CMake will try to find the correct version of the library on the system, but you must install it yourself. In * nix - systems, the system package manager does a good job of this, in Windows everything is bad (ie, we do it by hand).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question