From e492c4849e13d07b826fbabff204e3139e849283 Mon Sep 17 00:00:00 2001 From: Cyrill Raccaud Date: Sun, 2 Mar 2025 23:02:07 +0100 Subject: [PATCH] Add linux build instructions --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 277eeeb..8b00db2 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,19 @@ Install devel packages for `SDL2` and `SDL2_mixer`.\ Compile with CMake; tested with GCC 10, Clang 11.\ To cross-compile for Windows, install a 64-bit version of mingw and its `SDL2` and `SDL2_mixer` distributions, then use the `mingwcc.cmake` toolchain. -[![Packaging status](https://repology.org/badge/tiny-repos/spacecadetpinball.svg)](https://repology.org/project/spacecadetpinball/versions) +```sh +apt update +sudo apt install libsdl2-dev libsdl2-mixer-dev + +cd ../path/to/SpaceCadetPinball +mkdir build +cd build +cmake .. -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ # gcc +cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ # clang +make -j$(nproc) # Build with all available CPU cores +``` + +[![Packaging status](https://repology.org/badge/tiny-repos/spacecadetpinball.svg)](https://repology.org/project/spacecadetpinball/versions) Some distributions provide a package in their repository. You can use those for easier dependency management and updates.