leggedrobotics / ocs2

Optimal Control for Switched Systems
https://leggedrobotics.github.io/ocs2
BSD 3-Clause "New" or "Revised" License
874 stars 225 forks source link

Could not find a package configuration file provided by "onnxruntime" #96

Closed Morozovga691 closed 7 months ago

Morozovga691 commented 8 months ago

Errors << ocs2_mpcnet_core:cmake /home/g/catkin_new/logs/ocs2_mpcnet_core/build.cmake.015.log
CMake Error at /home/g/catkin_new/src/ocs2/ocs2_mpcnet/ocs2_mpcnet_core/CMakeLists.txt:15 (find_package): By not providing "Findonnxruntime.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "onnxruntime", but CMake did not find one.

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

onnxruntimeConfig.cmake
onnxruntime-config.cmake

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

Made all the steps as in instruction, but it still not working

ppap36 commented 7 months ago

My fellow said that he solved the problem by reboot the computer. We all don't know why.

Dicer-J commented 7 months ago

You can add the following code before find_package(onnxruntime REQUIRED)

set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};~/.local") 
set(onnxruntime_DIR "~/.local/share/cmake/onnxruntime")