irccd
3.0.3
|
Using CMake to extend irccd.
Irccd is built with CMake and also provide configuration package files and macros once installed. You may use these macros to create plugins, link to irccd and such.
You should use the main irccd
configuration package, it already exports everything.
The same targets are available as described in the mainpage, so you can link to libirccd like this:
Several macros are available to help you in the process of creating a plugin and installing it.
Create a Javascript or native plugin.
The NAME parameter identifies the plugin. The same name will be used for the plugin filename.
Both Javascript and native plugins are supported specified by the TYPE parameter to JS or NATIVE respectively. For Javascript plugin, a unique file must be given as SCRIPT parameter. For native plugins, any source files can be given as SOURCES parameter.
Additional documentation in manual page format can be specified with the MAN parameter.
A CMake option is also created in the form IRCCD_WITH_OPTION_<PLG> where PLG is the uppercase NAME value.
Synopsis for native plugins.
Synopsis:
Create a library and optionally install it.
The function create a new library named with the parameter TARGET, you should prefix it with "lib" as its the convention within irccd (e.g. libfoo), the prefix is automatically removed.
The argument SOURCES should contains the C++ source files and HEADERS should points to a directory to be installed verbatim in the include directory.
Optional argument FLAGS, PRIVATE_INCLUDES, PUBLIC_INCLUDES may be passed to set compile flags, private includes, public includes and libraries respectively.
If export boolean parameter is set, the library is exported and installed.
Synopsis:
Create an executable and optionally install it.
The function create a new executable named with the parameter TARGET. The argument SOURCES should contains the C++ source files and headers.
Optional argument FLAGS, INCLUDES, LIBRARIES may be passed to set compile flags, private libraries and public libraries respectively.
If export boolean parameter is set, the executable is exported and installed.
Synopsis:
This function configure the manual and install it if IRCCD_WITH_MAN is set.