Skip to content

Commit cdaa9c8

Browse files
committed
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`.
1 parent d55dd9f commit cdaa9c8

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,8 @@ Building on Linux and macOS
6969

7070
To compile DDNet yourself, execute the following commands in the source root:
7171

72-
mkdir build
73-
cd build
74-
cmake ..
75-
make -j$(nproc)
76-
77-
Pass the number of threads for compilation to `make -j`. `$(nproc)` in this case returns the number of processing units.
72+
cmake -Bbuild
73+
cmake --build build
7874

7975
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).
8076

@@ -159,7 +155,7 @@ This library isn't compiled, so you have to do it:
159155
sudo apt install libgtest-dev
160156
cd /usr/src/gtest
161157
sudo cmake CMakeLists.txt
162-
sudo make -j$(nproc)
158+
sudo make
163159

164160
# copy or symlink libgtest.a and libgtest_main.a to your /usr/lib folder
165161
sudo cp lib/*.a /usr/lib
@@ -312,11 +308,9 @@ sv_use_sql 1
312308
add_sqlserver r teeworlds record teeworlds "PW2" "localhost" "3306"
313309
add_sqlserver w teeworlds record teeworlds "PW2" "localhost" "3306"
314310

315-
$ mkdir build
316-
$ cd build
317-
$ cmake -DMYSQL=ON ..
318-
$ make -j$(nproc)
319-
$ ./DDNet-Server -f mine.cfg
311+
$ cmake -Bbuild -DMYSQL=ON
312+
$ cmake --build build --target DDNet-Server
313+
$ build/DDNet-Server -f mine.cfg
320314
```
321315

322316
<a href="https://repology.org/metapackage/ddnet/versions">

0 commit comments

Comments
 (0)