In order to use Communi as a library, build and install Communi using the standard mantra:
This integrates Communi with qmake from the corresponding Qt installation. To take Communi in use in your application, add the following lines to your qmake project (.pro) file:
This sets up the necessary include paths and linker rules in order to use the library. Notice that the needed Communi modules can be controlled via the COMMUNI
qmake variable. The above example enables all available modules.
In order to embed the whole Communi to an application, add the following line to your qmake project (.pro) file:
Alternatively, only specific module(s) can be included, for example:
This sets up the necessary include paths, and builds Communi sources into the application for convenient deployment on systems that do not have Communi installed. This option is also convenient when adding Communi as a Git submodule to your project tree.
The Communi source code can be compiled into a namespace to for example avoid symbol conflicts. In order to embed a namespaced Communi to an application, add the following lines to your qmake project (.pro) file: