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

Author Topic: Building SFML for Android on Windows  (Read 1772 times)

0 Members and 1 Guest are viewing this topic.

illift

  • Newbie
  • *
  • Posts: 2
    • View Profile
Building SFML for Android on Windows
« on: April 27, 2018, 01:29:36 am »
Hi,
i post here in addition to my first (https://fr.sfml-dev.org/forums/index.php?topic=23946.0) post on french forum for more visibility. sorry for my bad English.

i try to follow the tutorial: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android-on-Windows

i have correctly configure my environment variables
this is my PATH
Quote
c:\projects\SFML\build\armeabi-v7a>PATH
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windo
ws\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x
86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Progr
am Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Ser
ver\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\NVPACK\jdk1.8\bin;C:\Program Fil
es\Actionaz;C:\projects\cmake\bin;C:\projects\sdk\tools;C:\projects\sdk\platform
-tools;C:\projects\ndk;C:\projects\apache-ant\bin;C:\mingw\bin;


i have a error in cmake command step, this is my command:
Quote
cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..

and this is the output:
Quote
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_A
abi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.c
/..
CMake Error at cmake/toolchains/android.toolchain.cmake:802 (message):
  Specified Android native API level 'android-8' is not supported by your
  NDK/toolchain.
Call Stack (most recent call first):
  C:/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (includ
  CMakeLists.txt:48 (project)


CMake Deprecation Warning at C:/CMake/share/cmake-3.11/Modules/CMakeForce
r.cmake:69 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  cmake/toolchains/android.toolchain.cmake:1146 (CMAKE_FORCE_C_COMPILER)
  C:/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (includ
  CMakeLists.txt:48 (project)


CMake Deprecation Warning at C:/CMake/share/cmake-3.11/Modules/CMakeForce
r.cmake:83 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  cmake/toolchains/android.toolchain.cmake:1158 (CMAKE_FORCE_CXX_COMPILER
  C:/CMake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (includ
  CMakeLists.txt:48 (project)


CMake Error at cmake/Macros.cmake:291 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


-- Configuring incomplete, errors occurred!
See also "C:/projects/SFML/build/armeabi-v7a/CMakeFiles/CMakeOutput.log".


this is CMakeOutput.log:
Quote
The target system is: Android - 1 - armv7-a
The host system is: Windows - 6.1.7601 - AMD64


so, i tried more possible solutions, i add -DANDROID_NATIVE_API_LEVEL=android-21:
Quote
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_ABI=arme
abi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake
/toolchains/android.toolchain.cmake ../..

and the output change:
Quote
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_ABI=arme
abi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake
/toolchains/android.toolchain.cmake ../..
CMake Deprecation Warning at C:/projects/cmake/share/cmake-3.11/Modules/CMakeFor
ceCompiler.cmake:69 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  cmake/toolchains/android.toolchain.cmake:1146 (CMAKE_FORCE_C_COMPILER)
  C:/projects/cmake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (incl
ude)
  CMakeLists.txt:48 (project)


CMake Deprecation Warning at C:/projects/cmake/share/cmake-3.11/Modules/CMakeFor
ceCompiler.cmake:83 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  cmake/toolchains/android.toolchain.cmake:1158 (CMAKE_FORCE_CXX_COMPILER)
  C:/projects/cmake/share/cmake-3.11/Modules/CMakeDetermineSystem.cmake:91 (incl
ude)
  CMakeLists.txt:48 (project)


CMake Error at cmake/Macros.cmake:291 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


-- Configuring incomplete, errors occurred!
See also "C:/projects/SFML/build/armeabi-v7a/CMakeFiles/CMakeOutput.log".



i have also try to modify the toolchain like this: https://github.com/bingmann/android-cmake/commit/e0ec7de86d454894b3837a62b8676635b6d318f6

and after, this is my output:
Quote
c:\projects\SFML\build\armeabi-v7a>cmake -G "MinGW Makefiles" -DANDROID_ABI=arme
abi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake
/toolchains/android.toolchain.cmake ../..
-- The C compiler identification is GNU 4.9.0
-- The CXX compiler identification is GNU 4.9.0
-- Check for working C compiler: C:/projects/ndk/toolchains/arm-linux-androideab
i-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe
-- Check for working C compiler: C:/projects/ndk/toolchains/arm-linux-androideab
i-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/projects/ndk/toolchains/arm-linux-androide
abi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe
-- Check for working CXX compiler: C:/projects/ndk/toolchains/arm-linux-androide
abi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at cmake/Macros.cmake:291 (message):
  Missing item in FREETYPE_LIBRARY
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:137 (sfml_find_package)


-- Configuring incomplete, errors occurred!
See also "C:/projects/SFML/build/armeabi-v7a/CMakeFiles/CMakeOutput.log".

and CMakeOutput.log:
https://pastebin.com/bS3WQjJ3


if anyone has an idea to help me, or if I did something bad

thanks for ur help.