Fix linking of SDL for MiNT#952
Conversation
Brain-damaged cmake's find_package macro was always linking to lib/libSDL.a regardless of cpu
|
What hardware is this for? Can a 68k actually run C&C? |
|
A "better" 68k like 68040 or 68060 probably can. But i'm testing it currently in an emulator (Aranym). |
|
Does the find actually fail or does it just find the wrong files? I feel this should either be fixed in the find module or if we are going to hard code it into the CMake, do so at the point the libraries are found and manually popular the SDL_xxx variables with the appropriate content. |
|
It finds the wrong files. Our target uses a multi-lib configuration where cpu-specific libraries are in subdirs of /usr/lib. But the find_library makro of cmake only looks in /usr/lib, and passes the absolute path to the compiler, thus using a library for the wrong cpu. Its a general nuisance of cmake, not only when cross-compiling. Changing the module does not work, because that is a general version of the host system, not something that our toolchain provides. |
Brain-damaged cmake's find_package macro was always linking to lib/libSDL.a regardless of cpu