By not providing "Findoboe.cmake" in CMAKE_MODULE_PATH

534 Views Asked by At
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
1

There are 1 best solutions below

0
Hpsaturn On

I had the same problem, but it has relation with the prefab package of Oboe. CMake alone cannot solve this problem. It is not responsible for fetching dependencies or running prefab. I published an issue on Oboe project that describe the problem and it has the possible solutions:

https://github.com/google/oboe/issues/1705