首页 > 其他分享 >[转]By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has asked CMake

[转]By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has asked CMake

时间:2023-08-19 17:55:43浏览次数:43  
标签:FindEigen3 CMake package project Eigen3 CMAKE cmake find

在编译安装的时候出现如下问题,是Eigen3的Cmake依赖问题, 已经安装eigen3,但在项目的find_package(Eigen3 QUERIED)中,无法找到FindEigen3.Cmake. 

CMake Error at loam_velodyne/CMakeLists.txt:13 (find_package):
 
  By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Eigen3", but
  CMake did not find one.
 
  Could not find a package configuration file provided by "Eigen3" with any
  of the following names:
 
    Eigen3Config.cmake
    eigen3-config.cmake
 
  Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
  "Eigen3_DIR" to a directory containing one of the above files.  If "Eigen3"
  provides a separate development package or SDK, be sure it has been
  installed.

解决方案:

1. 找到 FindEigen3.cmake。也可以使用 locate FindEigen3.cmake 命令来查找。

2. 复制到项目文件夹下面,或者放在新建的cmake 文件夹内。

3. 修改项目 CMakeLists.txt。

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) //添加此句
 
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)

如果是放在新建的cmake文件夹下,则添加此句:

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

That's Done, then re catkin_make。

原文链接:https://www.freesion.com/article/2528371979/

翻译

搜索

复制

标签:FindEigen3,CMake,package,project,Eigen3,CMAKE,cmake,find
From: https://www.cnblogs.com/rainbow70626/p/17642811.html

相关文章

  • gcc make cmake ninja的区别
    理清C++编译过程用到的工具概念ref:GCC、CMake、CMakelist、Make、Makefile、Ninja啥关系?一图讲透!-知乎(zhihu.com)早先学C++的时候,因为只需要点击IDE的运行按钮,程序就可以跑起来,写过最复杂的只不过是几个文件的学生管理系统。现在要重新拾起C++,看的项目和之前的不可同日而......
  • Wiindows下更改CMake编译器为MinGW
    个人环境MinGW:使用QT6install的mingw1120_64.CMake:使用QT6install的CMake3.24.2.第一次编译时,默认生成VS的工程文件,为了修改编译器为MinGW,在编译时,键入:cmake-G"MinGWMakefiles"-DCMAKE_CXX_FLAGES=-std=c++11同时也指定了编译器支持的编译标准为c++11注......
  • cmake随笔
    cmakecmake命令使用##配置projectcmake[<options>]<path-to-source>`常用选项:-S<path-to-source>:指定源文件根目录-B<path-to-build>:指定构建文件目录-G<generator-name>:指定生成器。具体支持哪些生成器可用-DCMAKE_BUILD_TYPE=Debug:配置debug版-DCMAKE_BUI......
  • SAP CDS view 源代码中的 $projection
    我们看到下图CDSview源代码里association条件中的$projection.在SAPCDS(CoreDataServices)中,$projection是一个特殊的关键字,用于在查询中选择特定的字段并创建一个临时视图。它可以在CDS视图的源代码中使用,以对结果集进行处理和转换。通过使用$projection,可以根据需要......
  • 【IDEA】出现 Element ‘project‘ cannot have character [children]...错误
    问题描述Element'project'cannothavecharacter[children],becausethetype'scontenttypeiselement-only.元素'project'不能有字符[children],因为该类型的内容类型是仅元素。 我这边是因为多了一行注释没有删除导致 解决方案检查代码,删除多余的代码......
  • CMakeLists语法详解
     https://www.jianshu.com/p/eb25baf5ca19set(Root"${CMAKE_CURRENT_SOURCE_DIR}")set(Base64${Root}/lib/libb64/src)include_directories(${OpenCV_INCLUDE_DIRS})include_directories(${Root})include_directories(${Root}/lib/libb64/include) include_dir......
  • PnP and Perspective Projection and Pose Computation
    PnPandPerspectiveProjectionandPoseComputationReviewPnPproblemfromacomputergraphicsrenderingview首先从一个StackExchange问题出发,下面是本人的回答摘录。IntrinsicMatrixvs.ProjectionMatrixWhatisthedifferencebetweenIntrinsicMatrix(K)......
  • VSCode C++开发环境配置:CMake 调试配置 launch.json
    相关内容VSCodeC++开发环境配置:LLVMclangclangd安装cmakesudoaptinstallcmake安装VSCode插件CMakeCMakeTools编写CMakeLists.txtproject(hello)cmake_minimum_required(VERSION3.15.0)set(CMAKE_CXX_STANDARD17)set(CMAKE_CXX_EXTENSIONSOFF)add......
  • CMU 15445 spring - project 1 Buffer Pool实验笔记
    前排提醒本项目需要在linux/mac环境下进行开发,如果是windows最好是整个linux的环境,比如云服务器、虚拟机、wsl等。整个课程需要仔细看文档,包括bustub的readme,每篇project的描述。整个课程需要仔细看文档,包括bustub的readme,每篇project的描述。整个课程需要仔细看文档,包括bustu......
  • C99 Clion 项目目录结构 CMakeLists.txt
    简单helle目录如下.├──CMakeLists.txt├──hello│  └──hello.c└──main.cmain.c#include"hello//hello.c"intmain(){print_hello();return0;}hello.c#include<stdio.h>staticvoidprint_hello();voidprint_hello(){pr......