- 33
- 0
- 约5.49千字
- 约 7页
- 2016-09-17 发布于安徽
- 举报
PCL 学习笔记.docx
How To Write CmakeLists.Txt
Cmakelists.txt是作为Cmake building system的输入文件,用于构建软件包。
一、CmakeList.txt的简单例子
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
#set(project_name cloud_viewer_PointXYZ)
project(project_name)
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (project_name cloud_viewer_PointXYZ.cpp) #注意这里不能替换
target_link_libraries (project_name ${PCL_LIBRARIES})
二、解析
CmakeLists.txt的重要组成部分:
1、表明Cmake所需要的最低版本
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
2、定义需要的特殊变量(optional)(关于set
原创力文档

文档评论(0)