File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -11,16 +11,23 @@ set(ROS_BUILD_TYPE RelWithDebInfo)
11
11
12
12
rosbuild_init ()
13
13
14
- find_package (Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED )
14
+ # This plugin includes Qt widgets, so we must include Qt like so:
15
+ find_package (Qt4 COMPONENTS QtCore QtGui REQUIRED )
15
16
include (${QT_USE_FILE} )
16
17
18
+ # I prefer the Qt signals and slots to avoid defining "emit", "slots",
19
+ # etc because they can conflict with boost signals.
17
20
add_definitions (-DQT_NO_KEYWORDS )
18
21
22
+ # Here we specify which header files need to be run through "moc",
23
+ # Qt's meta-object compiler.
19
24
qt4_wrap_cpp (MOC_FILES
20
25
src/drive_widget.h
21
26
src/teleop_panel.h
22
27
)
23
28
29
+ # Here we specify the list of source files, including the output of
30
+ # the previous command which is stored in ${MOC_FILES}.
24
31
set (SOURCE_FILES
25
32
src/drive_widget.cpp
26
33
src/teleop_panel.cpp
@@ -35,5 +42,9 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
35
42
#set the default path for built libraries to the "lib" directory
36
43
set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR} /lib )
37
44
45
+ # An rviz plugin is just a shared library, so here we declare the
46
+ # library and specify the list of source files we collected above.
38
47
rosbuild_add_library (${PROJECT_NAME} ${SOURCE_FILES} )
39
- target_link_libraries (${PROJECT_NAME} ${QT_LIBRARIES} ${OGRE_LIBRARIES} )
48
+
49
+ # Link the library
50
+ target_link_libraries (${PROJECT_NAME} ${QT_LIBRARIES} )
Original file line number Diff line number Diff line change 26
26
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
27
* POSSIBILITY OF SUCH DAMAGE.
28
28
*/
29
+ // %Tag(FULL_SOURCE)%
29
30
#ifndef IMU_DISPLAY_H
30
31
#define IMU_DISPLAY_H
31
32
@@ -140,3 +141,4 @@ class ImuDisplay: public rviz::Display
140
141
} // end namespace rviz_plugin_tutorials
141
142
142
143
#endif // IMU_DISPLAY_H
144
+ // %EndTag(FULL_SOURCE)%
You can’t perform that action at this time.
0 commit comments