The Conan plugin by JFrog allows you to work with Conan, a package manager for C/C++, without leaving CLion. The plugin integrates Conan with CMake using a dependency provider, cmake-conan. This dependency provider translates the CMake configuration to Conan.
Follow the official installation guide to install Conan on your system.
Install the Conan plugin
Search for Conan in the Marketplace tab.
In the dialog that opens, click Accept:
Configure the plugin
Selectfrom the main menu or click the Conan icon to open the plugin tool window:
Provide the path to the Conan client executable or set the Use Conan installed in the system checkbox to use the one installed at the system level.
In the Use Conan for the following configurations section, set or clear the checkboxes that correspond to CMake profiles.
The Automatically add Conan support for all configurations option is enabled by default: the plugin will add Conan support for new profiles.
The last checkbox, also enabled by default, allows Conan to run CMake sequentially instead of running it in parallel. This is needed as the Conan cache is not concurrent up to Conan 2.0.9 version.
Add libraries to your project
Start typing the library name in the search field and select from the list of results:
Choose the library version and click Use in project:
This dialog shows all the libraries added to the project, with basic target information and code snippets to be added to CMake.
Add commands to CMakeLists.txt according to the instructions. For example:find_package(CURL) target_link_libraries(calendar_run CURL::libcurl)
Click the CMake reload icon in the editor or select.
Click in the Conan tool window to update the packages and the dependency provider: