| Summary: | Cmake build fails for Android | ||
|---|---|---|---|
| Product: | SDL | Reporter: | sfalexrog |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Possible fix | ||
The haptic fix is in: https://hg.libsdl.org/SDL/rev/598839965877j For the targets patch, please file a separate bug and attach it with an explanation for further review. I don't know CMake well enough to comment on that one. Thanks! |
Created attachment 2886 [details] Possible fix Android haptic code was not added to CMakeLists.txt, leading to build failures when targeting Android platform. Attached patch adds Android haptic driver to source sets and adds configuration parameter to SDL_config.h.cmake. Note that this patch also exports SDL2, SDL2-static, and SDL2-main targets in order to integrate SDL2 as a subproject in a build system (it might not be a desirable thing for some). I'm not familiar with CMake versions and when stuff got added (and whether you can even use export() function at 2.8.11), I can only say that it seems to work somehow with CMake that's bundled with Android SDK (3.6). To someone who's familiar with CMake: please do check the FILE parameter of export() call! I'm pretty sure I got it wrong.