Ok, thanks for the answer. I saw the line in the CMake script that try to find SFML in the NDK folder, and the .cmake files do exist.
So the command
cmake -DSFML_DIR=/ndk/sources/third_party/sfml/lib/armeabi-v7a/cmake/SFML -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_NDK=/ndk -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_BUILD_TYPE=Debug .. -G "MinGW Makefiles"
worked !
It's weird that the CMake script didn't use that folder since it's written to search that folder, line 169:
...
elseif(TGUI_OS_ANDROID) # Search for SFML in the android NDK (if no other directory is specified)
find_package(SFML 2 COMPONENTS graphics window system PATHS "${CMAKE_ANDROID_NDK}/sources/third_party/sfml/lib/${CMAKE_ANDROID_ARCH_ABI}/cmake/SFML")
...
Now I have another problem, when I start the application the activity start but the SFML window don't show...
Also, I couldn't build the example using your tutorial since it says that the android program is deprecated, and the command "update project --name TGUI --path . --target android-23" doesn't exist, so I made it using Gradle and following the SFML Android example and adding the tgui lines needed, but it doesn't work :|
I tried many tests to find why, and I managed to make the sfml example to work with TGUI
https://i.imgur.com/6Now8YD.jpg, the difference between the elements is huge but I think it's just a font size problem since the text that is not from a TGUI Widget have a font size of 64.
What blocked the example from working is the meta-data in the AndroidManifest.xml:
<meta-data android:name="android.app.lib_name" android:value="sfml-activity-d" />
<meta-data android:name="tgui.app.lib_name" android:value="tgui-activity-d" />
<meta-data android:name="sfml.app.lib_name" android:value="sfml-example" />
Having them with these names make it work, even with the tgui one last.
With a working project I replaced the SFML example main.cpp with your TGUI example main.cpp and it works fine.
I uploaded the working example:
http://files.nikurasu.org/tgui/example.zip, you only need to change the file local.properties with your Android SDK and NDK path, and an optionnal path to the file "tools.jar" found in Android Studio jre folder (used by gradle) which wasn't in the default Java folder for me.
Maybe the example in the repository need to be updated, but I don't know if the one I uploaded is fine, since I just copy/paste it from SFML without knowing a lot about it :/