Improve compiling documentation
Some checks failed
Build branch / build-all (push) Failing after 1m37s
CodeQL / Analyze (push) Has been cancelled

This commit is contained in:
smallmodel 2025-04-01 22:41:39 +02:00
parent f9db0ab8f9
commit a9e161181c
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -37,9 +37,13 @@ sudo apt-get install -y cmake ninja-build clang lld flex bison libsdl2-dev libop
Example with **CMake** and **ninja-build** installed:
```sh
mkdir .cmake && cd .cmake
cmake -G Ninja ../
cmake ../
cmake --build .
cmake --install .
```
Usually binaries get installed inside the `/usr/local/lib/openmohaa` directory.
Other compilers can be specified by appending `-DCMAKE_C_COMPILER=/path/to/compiler -DCMAKE_CXX_COMPILER=path/to/compiler` to the CMake command-line.
## Compiling for Windows
@ -50,8 +54,6 @@ Visual Studio (2019 or 2022) is generally preferred.
- Get OpenAL: https://github.com/kcat/openal-soft/releases/latest rename `soft_oal.dll` to `OpenAL64.dll` on 64-bit and `OpenAL32.dll` on 32-bit
- Get cURL: https://github.com/curl/curl
Append `-DFLEX_EXECUTABLE=...\win_flex.exe -DBISON_EXECUTABLE=...\win_bison.exe -DOPENAL_INCLUDE_DIR="path/to/oal/include" -DOPENAL_LIBRARY="path/to/oal"` to the CMake command-line to use the package from the link above.
Optionally, The cURL library can be compiled with the following CMake commands:
```
cmake -DCMAKE_INSTALL_PREFIX="E:\Src\openmoh\openmohaa\thirdparty\curl\build\install" -DCURL_USE_LIBPSL=OFF -DCURL_USE_SCHANNEL=ON -B build
@ -59,6 +61,18 @@ cmake --build build --config Release
cmake --install build --config Release
```
Append `-DFLEX_EXECUTABLE=...\win_flex.exe -DBISON_EXECUTABLE=...\win_bison.exe -DOPENAL_INCLUDE_DIR="path/to/oal/include" -DOPENAL_LIBRARY="path/to/oal"` to the CMake command-line to compile the project.
Example after cloning the repository:
```sh
mkdir .cmake && cd .cmake
cmake -DFLEX_EXECUTABLE=path/to/win_flex.exe -DBISON_EXECUTABLE=path/to/win_bison.exe -DOPENAL_INCLUDE_DIR="path/to/oal/include" -DOPENAL_LIBRARY="path/to/oal" ../
cmake --build .
cmake --install .
```
Usually binaries get installed inside the `Program Files (x86)` folder.
afterwards you can can append `-DCURL_ROOT=path\to\curl\install` to specify the install path to cURL.
## Tweaking the build