CMake Error: not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH

一.第一种解决方法

cd /usr/share/ ,cma tab补全,可以找到两个版本的cmake(cmake2.8和cmake3.5)

把/usr/share/cmake2.8/Modules/ 下的FindEigen3.cmake文件复制到cmake3.5对应目录下,即可解决

二.第二种解决方法

1、找到FindEigen3.cmake文件,/usr/share/cmake2.8/Modules 
2、复制到自己这个的工程下 
3、在工程的CMakeLists.txt里面。添加这句话:

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})*******就是这句,加上就行了。这样cmake就会到你自己工程目录下去找FindEigen3.cmake了。
find_package(Eigen3)
if(NOT EIGEN3_FOUND)
  # Fallback to cmake_modules
  find_package(cmake_modules REQUIRED)
  find_package(Eigen REQUIRED)
  set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
  set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES})  # Not strictly necessary as Eigen is head only
  # Possibly map additional variables to the EIGEN3_ prefix.
else()
  set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()

  

原文地址:https://www.cnblogs.com/sea-stream/p/9798681.html

时间: 2024-11-10 06:19:51

CMake Error: not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH的相关文章

MAC: CMake compile CloudCompare error:By not providing "FindQt5PrintSupport.cmake" in CMAKE_MODULE_PATH

ERROR message as: CMake Warning at CC/CMakeLists.txt:26 (message): CCLib configured without parallel algorithm capabilities - see COMPILE_CC_CORE_LIB_WITH_TBB CMake Error at cmake/CMakeExternalLibs.cmake:18 (find_package): By not providing "FindQt5Pr

mysql配置文件夹错误:在安装mysql 5.6.19 时运行cmake命令是出现CMake Error: The source directory does not appear to contai

在安装mysql 5.5.xx 时运行cmake命令是出现CMake Error: The source directory does not appear to contain CMakeLists.txt.的错误,刚開始以为是cmake版本号有问题,到最后才发现是当前文件夹错了. 在运行cmake时没有切换到mysql的源代码文件夹导致了这个错误,切换到mysql的源代码文件夹又一次运行cmake命令就可以. 下面的命令在解压后的文件夹内运行下面命令: cmake \ -DCMAKE_INS

CMake Error at cmake/boost.cmake:76 (MESSAGE)

在源码安装mysql5.7系列时,出现如下错误: 错误现象: CMake Error at cmake/boost.cmake:76 (MESSAGE): You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory> This CMake script will look for boost in <directory>.  If it is not there, it will download and

OpenCV for Mac 编译 CMake Error at cmake/OpenCVUtils.cmake:42 (if):

编译openCV for mac 总是报错 CMake Error at cmake/OpenCVUtils.cmake:42 (if): 无数次重试都无效,找了很多文章都没有提到这个错误,无意间在一篇文章中受到启发 原文地址: http://www.voidcn.com/blog/yu_fujiang/article/p-3986675.html 我的错误和这位大神基本类似,我是文件夹名取了个"c++" 于是将文件夹c++改成cplus 编译成功了

编译mysql时CMake Error at cmake/readline.cmake:85 (MESSAGE)

CMake Error at cmake/readline.cmake:85 (MESSAGE):  Curses library not found.  Please install appropriate package, remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel. Ca

CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp.

微型电脑或嵌入式与电脑还是有点不同的,在微型电脑上ros indigo 版本下利用catkin编译如果你遇到如下错误: CMake error:System Error:No such file or directory CMake error:Could not open file for write in copy operation xxxx.ros_Config.cmake.tmp. CMake error:at /opt/ros/indigo/share/catkin/cmake/ca

CMake Error at cmake/OpenCVModule.cmake:295 (message): No extra modules found in folder:Please provide path to &#39;opencv_contrib/modules&#39; folder

其实,我们使用的opencv中要用的contrib/modules   是需要额外下载并在cmakelists.txt中指定的 git clone https://github.com/opencv/opencv_contrib.git  然后,就有opencv_contrib  的path啦 CMake Error at cmake/OpenCVModule.cmake:295 (message): No extra modules found in folder:Please provide

mysql配置目录错误:在安装mysql 5.6.19 时执行cmake命令是出现CMake Error: The source directory does not appear to contai

在安装mysql 5.5.xx 时执行cmake命令是出现CMake Error: The source directory does not appear to contain CMakeLists.txt.的错误,刚开始以为是cmake版本有问题,到最后才发现是当前目录错了. 在执行cmake时没有切换到mysql的源码目录导致了这个错误,切换到mysql的源码目录重新执行cmake命令即可. 以下的命令在解压后的目录内执行以下命令: cmake \ -DCMAKE_INSTALL_PREF

-- Could not find the required component &#39;pcl_ros&#39;. The following CMake error indicates that you either

安装雷达驱动过程中遇到的问题,走一步坑一步 ~/robosense$ catkin_makeBase path: /home/leo2/robosenseSource space: /home/leo2/robosense/srcBuild space: /home/leo2/robosense/buildDevel space: /home/leo2/robosense/develInstall space: /home/leo2/robosense/install######## Runni