123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- cmake_minimum_required(VERSION 3.0.2)
- project(test)
- ## Compile as C++11, supported in ROS Kinetic and newer
- add_compile_options(-std=c++14)
- FIND_PACKAGE(Protobuf REQUIRED)
- ## Find catkin macros and libraries
- ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
- ## is used, also find other catkin packages
- find_package(catkin REQUIRED COMPONENTS
- roscpp
- std_msgs
- )
- find_package(PCL REQUIRED)
- set(vtk_flags)
- foreach(it ${dir_defs})
- if(it MATCHES "vtk*")
- list(APPEND vtk_flags ${it})
- endif()
- endforeach()
- foreach(d ${vtk_flags})
- remove_definitions(-D${d})
- endforeach()
- catkin_package(
- # INCLUDE_DIRS include
- # LIBRARIES pkgname
- # CATKIN_DEPENDS roscpp std_msgs
- # DEPENDS system_lib
- )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/Processing_Message PROCESSING_MESSAGE_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/message MESSAGE_SRC )
- aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/tool TOOL_SRC )
- include_directories(
- /usr/local/include
- ${catkin_INCLUDE_DIRS}
- ${PCL_INCLUDE_DIRS}
- ${PROTOBUF_INCLUDE_DIRS}
- message
- tool
- Processing_Message
- )
- add_executable(test_node
- ./src/main.cpp
- ${PROCESSING_MESSAGE_SRC}
- ${TOOL_SRC}
- ${MESSAGE_SRC}
- )
- target_link_libraries(test_node
- /usr/local/lib/libglog.a
- /usr/local/lib/libgflags.a
- ${catkin_LIBRARIES}
- ${PCL_LIBRARIES}
- ${PROTOBUF_LIBRARIES}
- nnxx
- nanomsg
- pthread
- )
|