Xenoveritas / abuse

Abuse SDL port originally from Crack-Dot-Com and released into the public domain
Other
128 stars 24 forks source link

Double-colon in SDL name is breaking the Linux build #21

Open suetanvil opened 2 years ago

suetanvil commented 2 years ago

When compiling on Ubuntu 20.04 using the system version of SDL2, the build fails in two places:

  1. cmake reports it can't find libSDL2. This is fixed by removing the 2.0.0 version arguments to find_package in CMakeLists.txt. (SDL is pretty good about backward compatibility so I'm reasonably confident this won't be a source of problems.)

  2. Linking fails with a message that it can't find SDL::SDL. This is fixed by removing the SDL:: prefix from the SDL packages. It also fixes a bunch of cmake warnings.

Once these changes are made, the build succeeds.

I've attached my changes as a diff but I can submit a pull request if you want.