一个最基础的cmake模板
# cmake needs this line cmake_minimum_required(VERSION 3.1) # Define project name project(opencv_example_project) find_package(OpenCV REQUIRED) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # Eigen find_package(Eigen3 3.3 REQUIRED) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${EIGEN3_INCLUDE_DIR}) # Declare the executable target built from your sources set(PROJECT_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/quaternion2sRt.cpp ${SRCS_DIR} ) add_executable(match match.cpp) target_link_libraries(match ${OpenCV_LIBS})
标签:cmakelist,CMAKE,基础,project,模板,cmake,match,DIR From: https://www.cnblogs.com/lockingball/p/16977787.html