指令(参数1 参数2…)
ADD_EXECUTABLE(hello main.c func.c)
ADD_EXECUTABLE(hello main.c;func.c)
find_library (
<VAR>
name | NAMES name1 [name2 ...] [NAMES_PER_DIR]
[ ]]
[ ]]
[ ]]
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
[
ONLY_CMAKE_FIND_ROOT_PATH |
NO_CMAKE_FIND_ROOT_PATH]
)
FIND_LIBRARY(RUNTIME_LIB rt /usr/lib /usr/local/lib NO_DEFAULT_PATH)
message(STATUS "The CMAKE_VERSION is ${CMAKE_VERSION}")
message(STATUS "The CMAKE_SOURCE_DIR is ${CMAKE_SOURCE_DIR}")
3D视觉精品课程推荐: 1.面向自动驾驶领域的多传感器数据融合技术 9.从零搭建一套结构光3D重建系统[理论+源码+实践]
## This is a standard CMakeLists.txt template, including
## how to enable C++11 compiler option and how to set 'Release'
## target compile option
cmake_minimum_required(VERSION 2.8)
project(cmake_template)
############# Use message function to print information ############
message(STATUS "CMake version: ${CMAKE_VERSION}")
############ enable C++11 compiler###############
## Method 1
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(WARNING "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.")
message(STATUS "Please use a different C++ compiler.")
endif()
## Method 2
set(CMAKE_CXX_STANDARD 11)
############ #enable warnings##################
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
#############Set cmake compiler options##############
## Method 1
set(CMAKE_BUILD_TYPE "Release")
## Method 2
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
################## Some useful arguments ##########################
set(CMAKE_INCLUDE_CURRENT_DIR ON)
##########
##Build###
##########
add_library(lib hello.cpp)
add_executable(main main.cpp)
target_link_libraries(main ${LINK_LIBRARIES})
cmake_minimum_required(VERSION 2.8.12)
project(OpenCV_test)
#find packages
find_package(OpenCV REQUIRED)
#include headers
include_directories(${OpenCV_INCLUDE_DIRS})
#target generation
add_executable(OpenCV_test main.cpp)
#link libraries
target_link_libraries(OpenCV_test ${OpenCV_LIBS})
cmake_minimum_required(VERSION 2.8.12)
project(PCL_test)
#find packages
find_package(PCL 1.7 REQUIRED)
add_definitions(${PCL_DEFINITIONS})
#include headers
include_directories(${PCL_INCLUDE_DIRS})
#target generation
add_executable(PCL_test main.cpp)
#link libraries
target_link_libraries(PCL_test ${PCL_LIBRARIES})
cmake_minimum_required(VERSION 2.8.12)
project(Eigen_test)
#find packages
find_package(Eigen3 REQUIRED)
#include headers
include_directories(${EIGEN3_INCLUDE_DIR})
#target generation
add_executable(Eigen_test main.cpp)
3.彻底搞透视觉三维重建:原理剖析、代码讲解、及优化改进
4.国内首个面向工业级实战的点云处理课程
5.激光-视觉-IMU-GPS融合SLAM算法梳理和代码讲解
6.彻底搞懂视觉-惯性SLAM:基于VINS-Fusion正式开课啦
7.彻底搞懂基于LOAM框架的3D激光SLAM: 源码剖析到算法优化
8.彻底剖析室内、室外激光SLAM关键算法原理、代码和实战(cartographer+LOAM +LIO-SAM)
重磅!3DCVer-学术论文写作投稿 交流群已成立
扫码添加小助手微信,可申请加入3D视觉工坊-学术论文写作与投稿 微信交流群,旨在交流顶会、顶刊、SCI、EI等写作与投稿事宜。
同时也可申请加入我们的细分方向交流群,目前主要有3D视觉、CV&深度学习、SLAM、三维重建、点云后处理、自动驾驶、多传感器融合、CV入门、三维测量、VR/AR、3D人脸识别、医疗影像、缺陷检测、行人重识别、目标跟踪、视觉产品落地、视觉竞赛、车牌识别、硬件选型、学术交流、求职交流、ORB-SLAM系列源码交流、深度估计等微信群。
一定要备注:研究方向+学校/公司+昵称,例如:”3D视觉 + 上海交大 + 静静“。请按照格式备注,可快速被通过且邀请进群。原创投稿也请联系。
▲长按群或投稿
▲长按
▲长按
发表评论