== Requirements

[cols="1,1,3"]
|===
|Name |Version |Notes

| link:https://www.qt.io/[Qt]
| 5.11.1 or later
| QtWebEngine should be buildable with older versions of Qt. Please use the
  latest version.

| link:http://www.boost.org/[boost]
| Version 1.66
| Components: program_options

| cmake
| Version 3.10
| Anything supporting modern cmake

| Compiler
| C++17 support
| gcc 7+; clang 4+; on Windows only MSVC is supported due to QtWebEngine

| asciidoc
| 
| Only for building manpage

|===

== Building from source
In short, the generic cmake build loop of 'cmake, make, make install' will
generate a makefile, build the program and install it.

[source, sh]
----
# clone the repository
git clone https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git smolbote.git
cd smolbote.git
git submodule init
git submodule update 3rd-party/SingleApplication/SingleApplication.git


# generate makefile
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..

# make && make install
make -j4
make install
----

You can also use ccmake (cmake curses interface) or cmake-gui.

=== vendor.cmake
vendor.cmake contains various settings to customize the way in which the program
functions. The available options and their values may change with revisions.
When changing vendor.cmake, make sure to have all values defined in the preset.

  -DVendor=path/to/custom-vendor.cmake

=== Compiler flags
cmake does not set any C++ flags by default, including no optimization flags.
You need to set these yourself if your build system doesn't set any either.

- On gcc/clang, no optimize flags are set by default, setting at least -O2 is
recommended; check vendor.cmake.

=== Install prefix (`-DCMAKE_INSTALL_PREFIX`)
Sets the install location prefix. Install targets are only set on Release builds.

- windows: Binary is written to bin/, and plugins to bin/plugins.
- others: Binary will be written to bin/, and plugins to lib/smolbote/.

=== Using libc++
You can use libc++ over stdlibc++ by setting UseLibCpp to On. Requires clang.

  -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On

// Additional items

include::Building/Breakpad.asciidoc[]

include::Building/Windows.asciidoc[]
