Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: cannot build sfml for android  (Read 3627 times)

0 Members and 2 Guests are viewing this topic.

OverPie

  • Newbie
  • *
  • Posts: 1
    • View Profile
cannot build sfml for android
« on: March 11, 2020, 01:41:47 pm »
cannot build on ArchLinux
log:

Quote
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find GLES (missing: GLES_LIBRARY GLES_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  cmake/Modules/FindGLES.cmake:14 (find_package_handle_standard_args)
  cmake/Macros.cmake:364 (find_package)
  src/SFML/Window/CMakeLists.txt:263 (sfml_find_package)


-- Configuring incomplete, errors occurred!
See also "/home/unix/Projects/SFML/build/armeabi-v7a/CMakeFiles/CMakeOutput.log".

build with:
Quote
cmake -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/path/to/ndk -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang ../..

ndk ver. 21

SL4y3R

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: cannot build sfml for android
« Reply #1 on: March 24, 2020, 09:47:59 am »
Same here.
This problem is caused by the lack of "GLES" directory in /usr/include.
« Last Edit: March 24, 2020, 10:01:49 am by SL4y3R »

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: cannot build sfml for android
« Reply #2 on: March 25, 2020, 05:53:34 pm »
ndk ver. 21

The ndk had some breaking changes in version 21 or 20, not sure which one. So the SDK manager does also provide an older NDK version which you can use for now, which works for SFML. It seems like they changed the paths findPackage looks for and therefore older cmake code breaks.
To fix this you could remove the findPackage call for android and just link gles directly, since it is guaranteed to be provided by the NDK anyway.

This problem is caused by the lack of "GLES" directory in /usr/include.
This path should not matter since the android toolchain should not look at your host system's header files which may/will be different to the one the actual GLES shared library was created from.

hyc3573

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: cannot build sfml for android
« Reply #3 on: January 15, 2021, 08:21:36 am »
Hello. I have the same issue. Can you explain in more detail about how to change the file?