Conan is a plugin for JFrog artifactory, spicily for c++ binaries. (
https://bintray.com/) (
https://conan.io/)
I use it to handle my binary libs and dependencies, e.g. OCC, boost...
After setting up a server (or use the conan-center (
https://bintray.com/conan/conan-center)) you are able to use the libs in cmake.
For example in my cmake file this looks like this:
"include(conan.cmake)
conan_cmake_run(REQUIRES OpenCascade/7.0@OpenCascade/7.0
BASIC_SETUP
BUILD missing)
#link_directories(${OCC_LIBRARY_DIR})
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
#conan_basic_setup()
set(OCC_INCLUDE_DIR ${CONAN_OPENCASCADE_ROOT}/include)
set(OCC_LIBRARY_DIR_DEBUG ${CONAN_OPENCASCADE_ROOT}/libd)
set(OCC_LIBRARY_DIR_RELEASE ${CONAN_OPENCASCADE_ROOT}/lib)
If i want to change the OCC version i just have to update the name of the package.
Cmake looks for the correct package and path which e.g. is
"*User*\.conan\data\OpenCascade\7.0\OpenCascade\7.0\package\88a8c94ba0d38ce69afccbcf0043e87eb56f222b\"
88a8c94ba0d38ce69afccbcf0043e87eb56f222b --> is a hash of the config i have created the package:
[settings]
arch=x86_64
build_type=Debug
compiler=Visual Studio
compiler.runtime=MDd
compiler.version=12
os=Windows
So it is possible to create the same package with different configs, e.g. different os, different compiler or different build types. And these packages can have their own binaries for that config.
The config (settings) are generating different hashs.
While running cmake, a script will create the the config hash at runtime with the current cmake config. This hash is used to find the correct package. If it is already local it will use this, if not it will be downloaded and then used.
I am not a conan expert and i am using conan just for a few packages, but for that it works like a charm.