How use SDL2 Android static lib |
Alundra
|
ok I finally got it working, a bug in Android.mk for SDL2_Static is there, here the fix :
has to be changed to :
|
|||||||||||||||
|
Alundra
|
There is no way to prebuilt each SDL2 .a files for each arch and use them in the android project to avoid to add the SDL2 sources in jni folder ?
|
|||||||||||
|
How use SDL2 Android static lib |
Eric Wing
Guest
|
On 6/7/15, Alundra wrote:
I have a branch that builds NDK_MODULE conformant binaries via CMake. (Once it is built, you don't actually need CMake.) It can build both dynamic and static libraries which are standalone and redeployable so you don't have to embed SDL in every project. I'm using this as a foundation piece in a new SDK that I hope to ship 'real soon'. I hope to get this mainlined someday, but it didn't make the cut for 2.0.4 and I've been busy otherwise. My original topic post was here: https://forums.libsdl.org/viewtopic.php?t=10263&sid=2888ecbb7fc048bbb49de54e0c357dda You can find my latest branch here: https://bitbucket.org/ewing/sdl_androidcmake -Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Alundra
|
Ok yea, you added the classical android toolchain for cmake and use it, this is what I wanted to do but the best should SDL2 to have that directly to avoid extra work.
One .bat can be added for windows and linux to call it to generate all arch once. |
|||||||||||
|
How use SDL2 Android static lib |
Eric Wing
Guest
|
On 6/8/15, Alundra wrote:
Well, once you have the toolchain and CMake, it *is* just a single script call to have SDL generate everything. Right now the most annoying part is generating the NDK standalone toolchain. For Linux/Mac, it is annoying, but pretty easy. Windows is huge pain though. If the CMake toolchain was improved to not require the NDK standalone toolchain, it would be a snap. I think this is possible, but last time I tried, I got overwhelmed and had to sideline it. (The toolchain changes I made were more meticulous than usual because I was validating all the compiler flags for each architecture to make sure they were the same as normal Android, and if not, were they good/legitimate changes. I've seen flag changes behave badly before.) -Eric -- Beginning iPhone Games Development http://playcontrol.net/iphonegamebook/ _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|