ROS rviz 交互使用

 #cmake version
cmake_minimum_required(VERSION 2.8)

 # project name
project(test)

 # find opencv3 OpenCVConfig.cmake
 #or 
set(OpenCV_DIR "/usr/local/opencv3.2.0/share/OpenCV")

 #FIND_PACKAGE(OpenCV REQUIRED)
find_package(OpenCV REQUIRED)
 #INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
include_directories(${OpenCV_INCLUDE_DIRS})
 #MESSAGE(STATUS "Project: ${PROJECT_NAME}")
 message(STATUS "Project: ${PROJECT_NAME}")

message(STATUS "OpenCV library status:")
message(STATUS "    version: ${OpenCV_VERSION}")
message(STATUS "    libraries: ${OpenCV_LIBS}")
message(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "    lib path: ${OpenCV_LIBS}")

#MESSAGE(STATUS "OpenCV library status:")
#MESSAGE(STATUS "    version: ${OpenCV_VERSION}")
#MESSAGE(STATUS "    libraries: ${OpenCV_LIBS}")
#MESSAGE(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")
#MESSAGE(STATUS "    lib path: ${OpenCV_LIBS}")

add_executable(opencv_test main.cpp)
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

你可能感兴趣的:(linux)