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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ppelleti

Pages: [1]
1
C / building CSFML for Android
« on: October 18, 2016, 04:47:26 am »
Hi,

I've successfully built SFML for Android by following these instructions, but now I'd like to build CSFML, as well.  (Ultimately, I'd like to build the Haskell binding, but CSFML is a prerequisite for that.)

Has anyone had any success building CSFML for Android?

I followed the same procedure as for SFML, but since CSFML doesn't have a file ../../cmake/toolchains/android.toolchain.cmake, I pointed at SFML's android.toolchain.cmake.  The command line I used was:

cd CSFML && \
    mkdir build && cd build && \
    mkdir armeabi && cd armeabi && \
    cmake -DANDROID_NATIVE_API_LEVEL=android-21 -DANDROID_STL=gnustl_static -DANDROID_ABI=armeabi -DCMAKE_TOOLCHAIN_FILE=../../../SFML/cmake/toolchains/android.toolchain.cmake ../.. && \
    make && make install

This failed with:

CMake Error at cmake/Config.cmake:31 (message):
  Unsupported operating system
Call Stack (most recent call first):
  CMakeLists.txt:20 (include)

Specifically, it appears that ${CMAKE_SYSTEM_NAME} is set to Android.  I don't know a lot about CMake, but I'm puzzled that in CSFML's Config.cmake, ${CMAKE_SYSTEM_NAME} is set to Android, but in SFML's Config.cmake, Android is handled in the case where ${CMAKE_SYSTEM_NAME} is Linux.  I don't understand why this variable has different values for SFML and CSFML.

I'll work on hacking up CSFML's Config.cmake to try to get it to build, but I was just curious if I'm on the right track, and if anyone has gotten this to work before.

Pages: [1]