I've built SDL for Android with ndk-build and Android-Make-Files. Now I want to find these libraries in my CMakeLists.txt. The libs are found here:
lib/
SDL/
arm64-v8a/
armeabi/
armeabi-v7a/
x86/
x96_64/
Each directory contains libSDL2.so
.
How can I load all these libraries in CMake and naming them SDL2_LIBRARY
?
My current approach is
set(SDL2_INCLUDE_DIR lib/SDL/include)
include_directories(${SDL2_INCLUDE_DIR})
FIND_LIBRARY(SDL2_LIBRARY NAMES libSDL2.so PATHS lib/Android/SDL/armeabi-v7a)
(I don't even know how to find all of them and not just armeabi-v7a
.)
EDIT: Since building for all plattforms is not possible, what is wrong with my usage of FIND_LIBRARY?