XinghaoChen9 / LiveFaceReco_RaspberryPi

Face recognition and live estimation on Raspberry Pi 4B with average FPS around 20 and 2800+ faces loaded.
Other
177 stars 45 forks source link

cmake 出错 #15

Closed yyhran closed 2 years ago

yyhran commented 2 years ago
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found version "4.5.5")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
OPENMP FOUND
CMake Error at CMakeLists.txt:32 (find_package):
  Could not find a package configuration file provided by "ncnn" with any of
  the following names:

    ncnnConfig.cmake
    ncnn-config.cmake

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

-- Configuring incomplete, errors occurred!
See also "/home/pi/LiveFaceReco_RaspberryPi/build/CMakeFiles/CMakeOutput.log".

使用 cmake .. 命令时报错如上,使用 wiki 上的方法安装 ncnn 后还是没解决,(cmake 命令略有不同,-DNCNN_VULKAN=ON 我改为了 OFF 才编译通过)

yyhran commented 2 years ago

通过下载 16 Sep 2020 版本的 ncnn 源码编译解决,同时注释掉 CMakeLists.txt 中的 find_package(ncnn REQUIRED HINTS ${NCNN_ROOT_PATH}/lib/cmake),并在 ADD_EXECUTABLE(LiveFaceReco src/main.cpp) 前面添加 LINK_DIRECTORIES(${CMAKE_CURRENT_LIST_DIR}/include/libs/RaspberryPi4B)