diff options
Diffstat (limited to 'doc/Building.asciidoc')
-rw-r--r-- | doc/Building.asciidoc | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/doc/Building.asciidoc b/doc/Building.asciidoc index 431d1e7..f1927de 100644 --- a/doc/Building.asciidoc +++ b/doc/Building.asciidoc @@ -13,11 +13,19 @@ | Version 1.66 | Components: program_options -| cmake -| Version 3.10 -| Anything supporting modern cmake +| link:https://mesonbuild.com/[meson] +| Version 0.48 +| -| Compiler +| ninja +| +| Requirement of meson + +| python3 +| +| Requirement both of meson, and some scripts in tools/ + +| A compiler | C++17 support | gcc 7+; clang 4+; on Windows only MSVC is supported due to QtWebEngine @@ -36,43 +44,37 @@ generate a makefile, build the program and install it. # clone the repository git clone https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git smolbote.git cd smolbote.git + +# These two submodules are required git submodule init git submodule update 3rd-party/SingleApplication/SingleApplication.git +git submodule update tools/Kconfiglib +# generate build.ninja +mkdir build +meson build -# generate makefile -mkdir build && cd build -cmake -DCMAKE_BUILD_TYPE=Release .. - -# make && make install -make -j4 -make install +# make +ninja ---- -You can also use ccmake (cmake curses interface) or cmake-gui. +=== Configuring smolbote +smolbote uses Kconfig to store and customize default application settings such +as keyboard shortcuts and paths. You can edit these settings by running +`tools/Kconfiglib/menuconfig.py` in the repository root. -=== 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. +When building, tools/config.py is used to load `platform-name/.config` and +generate a header file. - -DVendor=path/to/custom-vendor.cmake +=== Configuring meson +Run `meson configure` in the build directory to list available options. -=== 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. +Use `meson configure -Doption=value` change them. Ninja will regenerate its +build file on next run. -- 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 Breakpad -include::Building/Breakpad.asciidoc[] +See the link:https://mesonbuild.com/Quick-guide.html[meson documentation] for +more information on how to use meson. // Compiling on Windows include::Building/Windows.asciidoc[] + |