view doc/src/build.md @ 817:ebe561276c33

doc: start reworking, continue #752 @8h
author David Demelier <markand@malikania.fr>
date Mon, 19 Nov 2018 07:04:42 +0100
parents 2007a37d7e1a
children
line wrap: on
line source

You should use the irccd version provided by your package manger if possible. If
irccd is not available, you can build it from sources.

# Requirements

To build from sources, you need the following installed on your system:

- Compiler C++17 support,
- [Boost](http://boost.org),
- [CMake](http://www.cmake.org),
- [OpenSSL](https://www.openssl.org) (Optional) for connecting with SSL,
- [libedit](https://thrysoee.dk/editline) (Optional) for auto-completion,
- [doxygen](http://www.doxygen.org) (Optional) for C++ documentation.

# Running the build

When you're ready, extract the **irccd-x.y.z.tar.gz** where **x.y.z** is the
current version. Go to that directory, then type the following commands:

    $ mkdir _build_
    $ cd _build_
    $ cmake ..
    $ make
    $ sudo make install

This is the quick way of compiling and installing. It's also possible to set
some options to customize the build. See below.

# Customizing the build

You can configure some features when compiling irccd.

## Disabling JavaScript

You can disable JavaScript support.

    $ cmake .. -DIRCCD_WITH_JS=Off

## Disabling SSL

You can disable OpenSSL support, it is automatically unset if OpenSSL is not
found.

Warning: this is not recommended.

    $ cmake .. -DIRCCD_WITH_SSL=Off

## Disabling libedit

If for some reasons, you don't want auto-completion in `irccd-test`, you can
disable it.

    $ cmake .. -DIRCCD_WITH_LIBEDIT=Off

## Disabling HTML documentation

By default if Pandoc is available, the HTML documentation is built, you can
disable it.

    $ cmake .. -DIRCCD_WITH_HTML=Off

## Disable doxygen documentation

Doxygen documentation is built for C++ API. It is disabled if doxygen was not
found.

    $ cmake .. -DIRCCD_WITH_DOXYGEN=Off

## Disabling man pages

You can disable installation of manuals.

    $ cmake .. -DIRCCD_WITH_MAN=Off

## Installation path

Sometimes, you may need to install irccd over other place, for that, you can
specify the prefix where to install files.

On Unix systems, it's usually **/usr/local** and **C:/Program Files/Irccd** on
Windows.

To change this, use the following:

    $ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/some/directory

You can also control the installation of individual directories through the
[GNUInstallDirs][] CMake module.

Example:

    $ cmake .. -DCMAKE_INSTALL_DOCDIR=doc/irccd

GNUInstallDirs: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html