cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
868 stars 115 forks source link

Linux build instructions don't work on Ubuntu versions older than 23.10 #856

Closed Kurtsley closed 3 weeks ago

Kurtsley commented 3 weeks ago

I want to put this here in case anyone else is having trouble compiling this on Ubuntu.

It seems the libsdl2=image-dev and libsdl2-mixer-dev packages don't come with the necessary cmake files in the older versions of Ubuntu.

The version supplied with 22.04 does not include the cmake folder: https://packages.ubuntu.com/jammy/libsdl2-image-dev

My Solution

Note that my architecture folder is x86_64-linux-gnu, yours may differ.

Alternatively, you could purge the old versions and manually install the latest with dpkg...

There may be easier ways to get the latest versions of those packages, but this worked for me. The point is you need those files provided in the cmake folder which older versions don't supply.

Credit to this post that pointed in the right direction: https://stackoverflow.com/questions/52813560/i-have-libsdl2-image-dev-installed-via-apt-get-but-cmake-cannot-find-it