From a9e161181cb643cc86c508f27897e82bf6c9e554 Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Tue, 1 Apr 2025 22:41:39 +0200 Subject: [PATCH] Improve compiling documentation --- docs/compiling.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/compiling.md b/docs/compiling.md index 07c335a4..41b4f445 100644 --- a/docs/compiling.md +++ b/docs/compiling.md @@ -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