cmake
yzlh2009
这个作者很懒,什么都没留下…
展开
-
cmake脚本中的list
代码cmake_minimum_required(VERSION 2.8)set(mylist a)list(APPEND mylist b c)MESSAGE("${mylist}")MESSAGE(${mylist})foreach(component ${mylist}) MESSAGE(${component})endforeach(component)结果a;b;cabcabc结论list是用;隔开的字符串组,也可以以空格隔开,显示整个list时加上“”号会显示分原创 2021-08-06 15:24:22 · 637 阅读 · 0 评论 -
find_eigen代码分析
原版(在PCLConfig.cmake中)#remove this as soon as eigen is shipped with FindEigen.cmakemacro(find_eigen) if(PCL_ALL_IN_ONE_INSTALLER) set(EIGEN_ROOT "${PCL_ROOT}/3rdParty/Eigen") elseif(NOT EIGEN_ROOT) get_filename_component(EIGEN_ROOT "C:/Program原创 2021-08-05 16:07:58 · 401 阅读 · 0 评论 -
关于cmake中CMP0074变量设置以及<PackageName>_ROOT
使用cmake时出现CMP0074警告。CMake Warning (dev) at CMakeLists.txt:5 (find_package): Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables. Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy command to set t原创 2021-05-05 18:36:59 · 6996 阅读 · 8 评论 -
PCLConfig.cmake的关键代码解读(部分)
file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR)if(WIN32 AND NOT MINGW)# PCLConfig.cmake is installed to PCL_ROOT/cmake# 如果在WIN32系统中 PCLConfig.cmake 在 PCL_ROOT/cmake 目录下 get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)else(WIN32 AND NOT MINGW)# PCLConfig.原创 2021-01-15 19:07:20 · 1327 阅读 · 0 评论 -
PCL项目构建时提示Could not find a package configuration file
提示Could not find a package configuration file…Add the installation prefix of “PCL” to CMAKE_PREFIX_PATH or set “PCL_DIR” to a directory containing one of the above files分析出现这个提示,原因一般是库没有安装在默认位置,所以要指定cmake文件的正确位置解决cmake … -DCMAKE_PREFIX_PATH= cmake文件原创 2021-01-15 16:56:53 · 1162 阅读 · 0 评论 -
cmake的一些问题
CMAKE_MODULE_PATH这是变量是哪个程序设置的?这个问题我百度了好多网页没有找到答案。原创 2019-06-16 11:11:09 · 282 阅读 · 0 评论