From 4b2934eea06eca6198e0a8bfe0ff1488c29905ac Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Tue, 14 May 2024 21:28:16 +0200 Subject: [PATCH] README.md: Don't require the user to `mkdir`/`cd` Also remove the `-j$(nproc)` parameter, if the user wants to fast, they should use `ninja`. --- README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 78874f328..8d78ce812 100644 --- a/README.md +++ b/README.md @@ -68,12 +68,8 @@ Building on Linux and macOS To compile DDNet yourself, execute the following commands in the source root: - mkdir build - cd build - cmake .. - make -j$(nproc) - -Pass the number of threads for compilation to `make -j`. `$(nproc)` in this case returns the number of processing units. + cmake -Bbuild + cmake --build build DDNet requires additional libraries, some of which are bundled for the most common platforms (Windows, Mac, Linux, all x86 and x86\_64) for convenience and the official builds. The bundled libraries for official builds are now in the ddnet-libs submodule. Note that when you build and develop locally, you should ideally use your system's package manager to install the dependencies, instead of relying on ddnet-libs submodule, which does not contain all dependencies anyway (e.g. openssl, vulkan). See the previous section for how to get the dependencies. Alternatively see the following build arguments for how to disable some features and their dependencies (`-DVULKAN=OFF` won't require Vulkan for example). @@ -158,7 +154,7 @@ This library isn't compiled, so you have to do it: sudo apt install libgtest-dev cd /usr/src/gtest sudo cmake CMakeLists.txt -sudo make -j$(nproc) +sudo make # copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder sudo cp lib/*.a /usr/lib @@ -306,11 +302,9 @@ sv_use_sql 1 add_sqlserver r teeworlds record teeworlds "PW2" "localhost" "3306" add_sqlserver w teeworlds record teeworlds "PW2" "localhost" "3306" -$ mkdir build -$ cd build -$ cmake -DMYSQL=ON .. -$ make -j$(nproc) -$ ./DDNet-Server -f mine.cfg +$ cmake -Bbuild -DMYSQL=ON +$ cmake --build build --target DDNet-Server +$ build/DDNet-Server -f mine.cfg ```