0
android/CMakeLists.txt : C/C++ debug|x86_64 : CMake Error at /root/UAC/nokia-team-comms/R2/ntc-ue-app/plugin/ntc-client/uac/android/CMakeLists.txt:6 (find_package):
    By not providing "Findoboe.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "oboe", but
    CMake did not find one.

    Could not find a package configuration file provided by "oboe" with any of
    the following names:

      oboeConfig.cmake
      oboe-config.cmake

    Add the installation prefix of "oboe" to CMAKE_PREFIX_PATH or set
    "oboe_DIR" to a directory containing one of the above files.  If "oboe"
    provides a separate development package or SDK, be sure it has been
    installed.

oboe is already available in the following path.

CMakeLists.txt:

cmake_minimum_required(VERSION 3.10)

set(UAC_CPP_DIR "${CMAKE_SOURCE_DIR}/src/cpp")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2a")

find_package(oboe REQUIRED)
get_target_property(OBOE_INCLUDE_DIRS oboe::oboe INTERFACE_INCLUDE_DIRECTORIES)
android# find . -name oboe-config.cmake
./.cxx/cmake/debug/prefab/arm64-v8a/prefab/lib/aarch64-linux-android/cmake/oboe/oboe-config.cmake
./.cxx/cmake/debug/prefab/x86_64/prefab/lib/x86_64-linux-android/cmake/oboe/oboe-config.cmake
./.cxx/cmake/debug/prefab/armeabi-v7a/prefab/lib/arm-linux-androideabi/cmake/oboe/oboe-config.cmake
./.cxx/cmake/debug/prefab/x86/prefab/lib/i686-linux-android/cmake/oboe/oboe-config.cmake

android# uname -a
Linux devmachine 5.4.0-147-generic #164-Ubuntu SMP Tue Mar 21 14:23:17 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
mortalis
  • 2,060
  • 24
  • 34
user1455589
  • 19
  • 1
  • 4
  • 2
    So, have you tried to set `CMAKE_PREFIX_PATH` or `oboe_DIR` variable, as the error message suggests? – Tsyvarev Apr 27 '23 at 15:27
  • I have tried the oboe_DIR path it is giving some other error during compilation. Ideally it has to download the oboe package and link with it. – user1455589 Apr 28 '23 at 04:35
  • "... it is giving some other error during compilation" - So, configuration succeeds, but build ends with the error. For being able to handle this error, we need to look at it. – Tsyvarev Apr 28 '23 at 07:22
  • Do you have all the configs according to the doc: https://github.com/google/oboe/blob/main/docs/GettingStarted.md? Basically, implementation, prefab, cmake argument in `build.gradle`. And I see you're missing `CONFIG` inside the `find_package`. Start a fresh project by following the guide. If it works, check the difference between you project. – mortalis May 05 '23 at 19:09
  • Additionally, I can reproduce this on Windows, when removing the `prefab true` part from the `build.gradle` and using `find_package(oboe REQUIRED)` instead of `find_package(oboe REQUIRED CONFIG)` in `CMakeLists.txt`. It responds with the same error `"By not providing..."`. So the build doesn't find the prefab oboe lib. – mortalis May 05 '23 at 19:15

0 Answers0