Describes how to install the C++ library idol.
idol can be installed using a package manager (recommended) or built from source. Then, to be used from C++, it requires to be linked to your code.
Below, we give several examples on how to do this with the CMake build system.
Install using apt-get:
Install using brew:
See the Build from source page.
Because idol is built with CMake, integrating it with other CMake projects is very simple.
In your CMakeLists.txt, first look for the idol library by adding
Then, assuming your target is called my_target, simply add
That's it! You can now use idol in your C++ project.
Another possibility to link with idol is to let CMake download it and handle the linkage automatically.
Let's assume that you have a basic CMake project with a CMakeLists.txt that looks like this:
This file creates a target called my_target made of only one source file main.cpp.
Next, let's see how to download idol and link it to your target.
First, we use FetchContent to download idol.
Then, we can link idol to our target.
That's it! You can now use idol in your project.
Note that you some CMake options are available and listed on the Build from source page.
These can be set using set(MY_OPTION VALUE). Be sure to check them out!