From 7f3f96e75cd296ea3db1dfcba4e114af7b73a8ec Mon Sep 17 00:00:00 2001 From: Odysseas Diamadis Date: Wed, 20 Sep 2023 11:56:00 +0200 Subject: [PATCH 1/3] Added explanation for Debian issues --- doc/building.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/building.md b/doc/building.md index 81d075eebb..1e813165f9 100644 --- a/doc/building.md +++ b/doc/building.md @@ -121,6 +121,9 @@ Make sure you have all the dependencies installed. - Make sure you have everything from the [dependency list](#dependencies) - Select the compiler and mode: see `./configure --help` - Linux etc: `./configure` + - On Debian you might get an error saying that it couldn't find SDL2 library. This happens because the CMAKE prefix and SDL2 path are not set correctly. + The solution is to append at the end of the `./configure` command the cmake variables for both the prefix and SDL2 path, like so: + `./configure -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths) - macOS: `./configure --compiler=clang` - hassle-free building on macOS (if above is not working) - get the latest llvm build from: `https://github.com/llvm/llvm-project/releases/latest` From 92801346fc8b537ffb80d24741c06f1ddd69d667 Mon Sep 17 00:00:00 2001 From: Odysseas Diamadis Date: Wed, 20 Sep 2023 11:58:53 +0200 Subject: [PATCH 2/3] fixing spaces --- doc/building.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/building.md b/doc/building.md index 1e813165f9..5e3ab09d90 100644 --- a/doc/building.md +++ b/doc/building.md @@ -122,8 +122,8 @@ Make sure you have all the dependencies installed. - Select the compiler and mode: see `./configure --help` - Linux etc: `./configure` - On Debian you might get an error saying that it couldn't find SDL2 library. This happens because the CMAKE prefix and SDL2 path are not set correctly. - The solution is to append at the end of the `./configure` command the cmake variables for both the prefix and SDL2 path, like so: - `./configure -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths) + The solution is to append at the end of the `./configure` command the cmake variables for both the prefix and SDL2 path, like so: + - `./configure -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths) - macOS: `./configure --compiler=clang` - hassle-free building on macOS (if above is not working) - get the latest llvm build from: `https://github.com/llvm/llvm-project/releases/latest` From 4cb38291c2787208685a8a82181fb2ee87a2f554 Mon Sep 17 00:00:00 2001 From: Odysseas Diamadis Date: Wed, 20 Sep 2023 13:50:46 +0200 Subject: [PATCH 3/3] Moved explanation to troubleshooting --- doc/building.md | 3 --- doc/troubleshooting.md | 5 +++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/building.md b/doc/building.md index 5e3ab09d90..81d075eebb 100644 --- a/doc/building.md +++ b/doc/building.md @@ -121,9 +121,6 @@ Make sure you have all the dependencies installed. - Make sure you have everything from the [dependency list](#dependencies) - Select the compiler and mode: see `./configure --help` - Linux etc: `./configure` - - On Debian you might get an error saying that it couldn't find SDL2 library. This happens because the CMAKE prefix and SDL2 path are not set correctly. - The solution is to append at the end of the `./configure` command the cmake variables for both the prefix and SDL2 path, like so: - - `./configure -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths) - macOS: `./configure --compiler=clang` - hassle-free building on macOS (if above is not working) - get the latest llvm build from: `https://github.com/llvm/llvm-project/releases/latest` diff --git a/doc/troubleshooting.md b/doc/troubleshooting.md index 7fce2fbaec..5ed9cc440a 100644 --- a/doc/troubleshooting.md +++ b/doc/troubleshooting.md @@ -36,3 +36,8 @@ include the necessary CMake files defining the target. There is an indepth discu [here](https://discourse.libsdl.org/t/how-is-sdl2-supposed-to-be-used-with-cmake/31275/16). As a solution, you should update your SDL packages to SDL >=2.0.12 or **compile the latest SDL2 and SDL2-image from source**. The latest version includes the necessary CMake files to expose the `SDL2::SDL2` target. + +## Building on Debian 12 +On Debian you might get an error saying that it couldn't find SDL2 library. This happens because the CMAKE prefix and SDL2 path are not set correctly. +The solution is to append at the end of the `./configure` command the cmake variables for both the prefix and SDL2 path, like so: +`./configure -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths)