1
General discussions / Build with arm64-v8a and link in CMAKE
« on: April 30, 2020, 05:17:27 pm »
I know that SFML currently doesn't support arm64-v8a, but my programe have already included some thirdparty api with arm64-v8a veriosn.
Therefore, I tried to rebuild sfml arm64-v8a veriosn.
I found some pre-built arm64-v8a like libfreetype.a and libopenal.so then I put them at SFML-2.5.1\extlibs\libs-android\arm64-v8a\
Moreover, I don't need the audio modlue in SFML so I deleted audio modlue inculding in CmakeLists.
Build Command:
cmake -G "MinGW Makefiles" -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_STL=c++_static -DCMAKE_ANDROID_API=24 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_BUILD_TYPE=Release ../..
Finally it built successfully and I included these .so file in CmakeLists.
Like these:
It was built successfully without any errors, but when I was running the program, it crashed directly.
Does anyone have relevant experience or know which step of mine is wrong?
Therefore, I tried to rebuild sfml arm64-v8a veriosn.
I found some pre-built arm64-v8a like libfreetype.a and libopenal.so then I put them at SFML-2.5.1\extlibs\libs-android\arm64-v8a\
Moreover, I don't need the audio modlue in SFML so I deleted audio modlue inculding in CmakeLists.
Build Command:
cmake -G "MinGW Makefiles" -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_STL=c++_static -DCMAKE_ANDROID_API=24 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_BUILD_TYPE=Release ../..
Finally it built successfully and I included these .so file in CmakeLists.
Like these:
add_library(libsfml-graphics SHARED IMPORTED)
set_target_properties(
libsfml-graphics
PROPERTIES IMPORTED_LOCATION
${IIIVSLAM_LIB_DIR}/SFML/libs/arm64-v8a/libsfml-graphics.so
)
target_link_libraries(
libsfml-graphics
)
set_target_properties(
libsfml-graphics
PROPERTIES IMPORTED_LOCATION
${IIIVSLAM_LIB_DIR}/SFML/libs/arm64-v8a/libsfml-graphics.so
)
target_link_libraries(
libsfml-graphics
)
It was built successfully without any errors, but when I was running the program, it crashed directly.
Does anyone have relevant experience or know which step of mine is wrong?