Open jeacwen opened 2 years ago
修改CMakeLists.txt 如下 cmake_minimum_required(VERSION 2.8.11) project(rviz_cloud_annotation)
find_package(catkin REQUIRED COMPONENTS cv_bridge interactive_markers pcl_conversions roscpp tf visualization_msgs geometry_msgs eigen_conversions cmake_modules std_msgs rviz pcl_ros ) find_package(OpenCV) find_package(Eigen3 REQUIRED) find_package(Boost REQUIRED) find_package(PCL ) message(WARNING "PCL 1.8 found")
set(MAYBE_PCL_COMMON_COLORS "")
find_package(PCL REQUIRED) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/pcl_include) set(MAYBE_PCL_COMMON_COLORS "${CMAKE_CURRENT_SOURCE_DIR}/pcl_include/colors.cpp")
find_package(Qt5Widgets REQUIRED) set(CMAKE_CXX_STANDARD 11) # C++11... set(CMAKE_AUTOMOC ON) add_definitions(-DQT_NO_KEYWORDS)
add_definitions(${PCL_DEFINITIONS}) link_directories(${PCL_LIBRARY_DIRS})
################################################
################################################
add_message_files( FILES UndoRedoState.msg RectangleSelectionViewport.msg )
generate_messages( DEPENDENCIES std_msgs geometry_msgs )
###################################
###################################
include_directories( ${catkin_INCLUDE_DIRS} ${PCL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${Eigen3_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} )
add_executable(rviz_cloud_annotation_node src/rviz_cloud_annotation.cpp ${MAYBE_PCL_COMMON_COLORS} )
add_dependencies(rviz_cloud_annotation_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries( rviz_cloud_annotation_node rviz_cloud_annotation_com ${PCL_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${catkin_LIBRARIES} )
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
add_library(rviz_cloud_annotation_plugin src/rviz_cloud_annotation_plugin.cpp src/rviz_select_tool.cpp ${MAYBE_PCL_COMMON_COLORS} )
add_dependencies(rviz_cloud_annotation_plugin ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(rviz_cloud_annotation_plugin ${PCL_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} Qt5::Widgets )
add_library(rviz_cloud_annotation_com src/rviz_cloud_annotation_points.cpp src/rviz_cloud_annotation_points_io.cpp src/rviz_cloud_annotation_point_plane.cpp src/rviz_cloud_annotation_class.cpp src/rviz_cloud_annotation_undo.cpp src/point_neighborhood.cpp src/point_neighborhood_search.cpp src/point_cloud_plane_curves_extract.cpp src/point_cloud_plane_params.cpp ${MAYBE_PCL_COMMON_COLORS} )
add_dependencies(rviz_cloud_annotation_com ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(rviz_cloud_annotation_com ${PCL_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} Qt5::Widgets )
请问这个有解决方案了吗