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

Author Topic: Could not find OpenAL while cmaking Android on Windows 10  (Read 2748 times)

0 Members and 1 Guest are viewing this topic.

dmitry_t

  • Newbie
  • *
  • Posts: 17
    • View Profile
Could not find OpenAL while cmaking Android on Windows 10
« on: February 13, 2018, 09:48:02 pm »
Hi there!

I am trying to build Android application on Windows 10, basically performing steps described in this tutorial: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android-on-Windows.

When I used the command
Quote
cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..
I got the following error:
Quote
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:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeDetermineSystem.cmake:95 (include)
  CMakeLists.txt:47 (project)

So I have added an extra option, -DANDROID_NATIVE_API_LEVEL=android-21 (which corresponds to the API level mentioned in the tutorial).

Now, while using the command
Quote
cmake -G "MinGW Makefiles" -DANDROID_ABI=armeabi-v7a -DANDROID_NATIVE_API_LEVEL=android-21 -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchains/android.toolchain.cmake ../..
I get the following error:
Quote
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindOpenAL.cmake:101 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/Audio/CMakeLists.txt:76 (find_package)

Could anyone help please?


Update
Just in case I added some logging into the Audio module CMakeList.txt before the if block the line 76 belongs to:
Quote
***** SFML_OS_ANDROID: 1
***** CMAKE_INCLUDE_PATH: C:/Users/Dmitry/projects/sfml/extlibs/headers;C:/Users/Dmitry/projects/sfml/extlibs/headers/AL;C:/Users/Dmitry/projects/sfml/extlibs/android

Then I added some logging into C:\Users\Dmitry\projects\sfml\src\SFML\CMakeLists.txt:
Quote
elseif(SFML_OS_ANDROID)
    message("***** CMAKE_ANDROID_ARCH_ABI: ${CMAKE_ANDROID_ARCH_ABI}")
    set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "${PROJECT_SOURCE_DIR}/extlibs/headers")
    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${PROJECT_SOURCE_DIR}/extlibs/libs-android/${CMAKE_ANDROID_ARCH_ABI}")
endif()
and got
Quote
***** CMAKE_LIBRARY_PATH: C:/Users/Dmitry/projects/sfml/extlibs/libs-android/
***** CMAKE_ANDROID_ARCH_ABI:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/FindOpenAL.cmake:96 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/Audio/CMakeLists.txt:76 (find_package)

It looks like CMAKE_ANDROID_ARCH_ABI does not add the required suffix "armeabi-v7a" to the path.
Unfortunately, putting ANDROID_NDK_ABI_NAME instead does not solve the issue either:
Quote
***** CMAKE_LIBRARY_PATH: C:/Users/Dmitry/projects/sfml/extlibs/libs-android/armeabi-v7a
***** CMAKE_ANDROID_ARCH_ABI:
***** ANDROID_NDK_ABI_NAME: armeabi-v7a
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files (x86)/CMake/share/cmake-3.10/Modules/FindOpenAL.cmake:96 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/Audio/CMakeLists.txt:76 (find_package)
« Last Edit: February 19, 2018, 07:41:33 am by dmitry_t »

dmitry_t

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Could not find OpenAL while cmaking Android on Windows 10
« Reply #1 on: February 21, 2018, 07:01:51 pm »
No ideas?
I've decided to build SFML using Android Studio CMake and even succeeded in that.
But I'm still curious what's happened there.