Debian Codegraph @

docpages/building/openbsd.md

raw symbols SCIP
1 \page buildopenbsd Building on OpenBSD
2
3 \note This page assumes you are the root user. If you are not, start the package install commands with `doas`, along with `make install`.
4
5 ## 1. Toolchain
6
7 Since the project uses `CMake`, you'll need to install it! If you don't have it, you can do the following:
8
9 ```bash
10 pkg_add cmake
11 ```
12
13 ## 2. Install Voice Dependencies (Optional)
14
15 If you wish to use voice support, you'll need to do the following:
16
17 ```bash
18 pkg_add opus
19 ```
20
21 ## 3. Build Source Code
22
23 ```bash
24 cmake -B ./build
25 cmake --build ./build -j8
26 ```
27
28 Replace the number after `-j` with a number suitable for your setup, usually the same as the number of cores on your machine. `cmake` will fetch any dependencies that are required for you and ensure they are compiled alongside the library.
29
30 ## 4. Install Globally
31
32 ```bash
33 cd build; make install
34 ```
35
36 ## 5. Installation to a Different Directory
37
38 If you want to install the library, its dependencies and header files to a different directory, specify this directory when running `cmake`:
39
40 ```bash
41 cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
42 ```
43
44 Then once the build is complete, run `make install` to install to the location you specified.
45
46 ## 6. Using the Library
47
48 Once installed to the `/usr/local` directory, you can make use of the library in CMake, without linking to a folder! You can't use this with `clang++`, nor `g++`, as OpenBSD seems to be broken on this end, so your only option from here is to use CMake. This isn't a bad thing, as we recommend people to use CMake anyways!
49
50 **Have fun!**