Skip to content

Commit

Permalink
Moved explanation to troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
mantador committed Sep 20, 2023
1 parent 9280134 commit 4cb3829
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <your configure opts> -- -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`
Expand Down
5 changes: 5 additions & 0 deletions doc/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <your configure opts> -- -DCMAKE_PREFIX_PATH=/usr -DSDL2_DIR=/usr/include/SDL2` (you can use `find` to look for the correct paths)

0 comments on commit 4cb3829

Please sign in to comment.