diff --git a/CMakeLists.txt b/CMakeLists.txt index 48c140dc579df9b84efc9c001c28dc6ec4bb7621..34712a9762d89011788724ae2ba2e1d292ef2084 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,16 @@ project(lrs_rviz_noetic) ## 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) +find_package(catkin REQUIRED COMPONENTS + rviz + roscpp + ) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_INCLUDE_CURRENT_DIR TRUE) + +find_package(Qt5Core REQUIRED) +find_package(Qt5Gui REQUIRED) ## System dependencies are found with CMake's conventions # find_package(Boost REQUIRED COMPONENTS system) @@ -113,7 +122,9 @@ catkin_package( ## Your package locations should be listed before other locations include_directories( # include -# ${catkin_INCLUDE_DIRS} +${catkin_INCLUDE_DIRS} +/usr/include/OGRE +/opt/ros/noetic/include/rviz ) ## Declare a C++ library @@ -121,6 +132,19 @@ include_directories( # src/${PROJECT_NAME}/lrs_rviz_noetic.cpp # ) +add_library(lrs_rviz_plugin + src/image_visual.cc + src/image_display.cc +) + +target_link_libraries(lrs_rviz_plugin + ${catkin_LIBRARIES} + ${QT_LIBRARIES} + Qt5::Gui + Qt5::Core +) + + ## Add cmake target dependencies of the library ## as an example, code may need to be generated before libraries ## either from message generation or dynamic reconfigure diff --git a/package.xml b/package.xml index 3ea76df6732f6b73b197cdcec741c507d7088c8f..c28789afcbc356ba9fa05cdbcf83f138fac485d8 100644 --- a/package.xml +++ b/package.xml @@ -52,11 +52,13 @@ <!-- Use doc_depend for packages you need only for building documentation: --> <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> + <depend>roscpp</depend> + <depend>rviz</depend> <!-- The export tag contains other, unspecified, tags --> <export> <!-- Other tools can request additional information be placed here --> - + <rviz plugin="${prefix}/plugin_description.xml"/> </export> </package>