Record: My CMakeLists
#1 设置需要的最小版本的cmake cmake_minimum_required(VERSION 3.10)
#2 定义生成的项目名 project(perceive_tracking)
#3.1 设置cmake参数 set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++11 -O3”) set(CMAKE_BUILD_TYPE Release)
#3.2 定义CUDA_USE_STATIC_CUDA_RUNTIME,并将其值设为OFF #为了解决cannot find -lopencv_dep_cudart问题 option(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
#4 查找需要的包的头文件和库 find_package(CUDA REQUIRED) find_package(OpenCV REQUIRED) find_packag
共有 0 条评论