diff --git a/src/python_bindings/sip/CMakeLists.txt b/src/python_bindings/sip/CMakeLists.txt index 0921754bcb..4dabd5df79 100644 --- a/src/python_bindings/sip/CMakeLists.txt +++ b/src/python_bindings/sip/CMakeLists.txt @@ -42,7 +42,7 @@ find_package(python_qt_binding REQUIRED) include(${python_qt_binding_EXTRAS_DIR}/sip_helper.cmake) # maintain context for different named target -set(rviz_sip_INCLUDE_DIRS ${rviz_INCLUDE_DIRS} "${PROJECT_SOURCE_DIR}/src" ${catkin_INCLUDE_DIRS}) +set(rviz_sip_INCLUDE_DIRS ${rviz_INCLUDE_DIRS} "${PROJECT_SOURCE_DIR}/src" ${catkin_INCLUDE_DIRS} $) set(rviz_sip_LIBRARIES ${rviz_LIBRARIES} ${PROJECT_NAME}) set(rviz_sip_LIBRARY_DIRS ${rviz_LIBRARY_DIRS} ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}) if (MSVC) diff --git a/src/rviz/CMakeLists.txt b/src/rviz/CMakeLists.txt index 5304d14fa8..4a2142e601 100644 --- a/src/rviz/CMakeLists.txt +++ b/src/rviz/CMakeLists.txt @@ -129,6 +129,10 @@ add_library(${PROJECT_NAME} ${ENV_CONFIG_FILE} ) +include(GenerateExportHeader) +generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME rviz/${PROJECT_NAME}_export.h) +target_include_directories(${PROJECT_NAME} INTERFACE "$") +set_target_properties(${PROJECT_NAME} PROPERTIES EXPORT_HEADER_DIR "${CMAKE_CURRENT_BINARY_DIR}") if(NOT WIN32) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-std=c++11") endif() @@ -177,5 +181,10 @@ install(DIRECTORY ./ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} FILES_MATCHING PATTERN "*.h") +#catkin_lint: ignore_once missing_file +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/rviz/${PROJECT_NAME}_export.h + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) + install(TARGETS executable DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}) diff --git a/src/rviz/default_plugin/CMakeLists.txt b/src/rviz/default_plugin/CMakeLists.txt index 4445d0df35..08e945080e 100644 --- a/src/rviz/default_plugin/CMakeLists.txt +++ b/src/rviz/default_plugin/CMakeLists.txt @@ -70,6 +70,9 @@ set(SOURCE_FILES ) add_library(${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME} ${SOURCE_FILES}) +include(GenerateExportHeader) +generate_export_header(${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME} EXPORT_FILE_NAME rviz/default_plugin/${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME}_export.h) +target_include_directories(${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME} INTERFACE "$") if(NOT WIN32) set_target_properties(${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME} PROPERTIES COMPILE_FLAGS "-std=c++11") @@ -82,6 +85,11 @@ target_link_libraries(${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME} ${QT_LIBRARIES} ) +#catkin_lint: ignore_once missing_file +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/rviz/default_plugin/${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME}_export.h + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}/default_plugin/) + install(TARGETS ${rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} diff --git a/src/rviz/default_plugin/interactive_markers/interactive_marker.h b/src/rviz/default_plugin/interactive_markers/interactive_marker.h index fc0e858b1a..0a8c225c12 100644 --- a/src/rviz/default_plugin/interactive_markers/interactive_marker.h +++ b/src/rviz/default_plugin/interactive_markers/interactive_marker.h @@ -50,6 +50,7 @@ #include "rviz/selection/forwards.h" #include "rviz/ogre_helpers/axes.h" +#include "rviz/default_plugin/rviz_default_plugin_export.h" #include "rviz/default_plugin/interactive_markers/interactive_marker_control.h" #include "rviz/properties/status_property.h" @@ -64,7 +65,7 @@ namespace rviz class DisplayContext; class InteractiveMarkerDisplay; -class InteractiveMarker : public QObject +class RVIZ_DEFAULT_PLUGIN_EXPORT InteractiveMarker : public QObject { Q_OBJECT public: diff --git a/src/rviz/display.h b/src/rviz/display.h index c17ae5cca0..e3765c1f60 100644 --- a/src/rviz/display.h +++ b/src/rviz/display.h @@ -37,6 +37,7 @@ #include "rviz/properties/status_property.h" #include "rviz/properties/bool_property.h" +#include "rviz/rviz_export.h" #include #include @@ -60,7 +61,7 @@ class StatusList; class DisplayContext; class PanelDockWidget; -class Display: public BoolProperty +class RVIZ_EXPORT Display: public BoolProperty { Q_OBJECT public: diff --git a/src/rviz/display_group.h b/src/rviz/display_group.h index 2edb336b4c..8251f899e2 100644 --- a/src/rviz/display_group.h +++ b/src/rviz/display_group.h @@ -30,6 +30,7 @@ #define DISPLAY_GROUP_H #include "display.h" +#include "rviz/rviz_export.h" namespace rviz { @@ -44,7 +45,7 @@ class DisplayFactory; * Property superclass stores the non-Display properties and this * class stores the Display objects in a separate list. The * separation is enforced in addChild(). */ -class DisplayGroup: public Display +class RVIZ_EXPORT DisplayGroup: public Display { Q_OBJECT public: diff --git a/src/rviz/frame_position_tracking_view_controller.h b/src/rviz/frame_position_tracking_view_controller.h index 5fdfc9433a..993db9a896 100644 --- a/src/rviz/frame_position_tracking_view_controller.h +++ b/src/rviz/frame_position_tracking_view_controller.h @@ -34,6 +34,7 @@ #include #include "rviz/view_controller.h" +#include "rviz/rviz_export.h" namespace rviz { @@ -42,7 +43,7 @@ class TfFrameProperty; /** @brief Base class of ViewControllers which have a "Target Frame" * which is a TF frame whose position they track. */ -class FramePositionTrackingViewController: public ViewController +class RVIZ_EXPORT FramePositionTrackingViewController: public ViewController { Q_OBJECT public: diff --git a/src/rviz/image/image_display_base.h b/src/rviz/image/image_display_base.h index 005888d853..06b4c5ae51 100644 --- a/src/rviz/image/image_display_base.h +++ b/src/rviz/image/image_display_base.h @@ -46,6 +46,7 @@ # include "rviz/properties/int_property.h" # include "rviz/display.h" +# include "rviz/rviz_export.h" #endif namespace rviz @@ -57,7 +58,7 @@ namespace rviz * it handles subscribing and unsubscribing when the display is * enabled or disabled. */ -class ImageDisplayBase : public Display +class RVIZ_EXPORT ImageDisplayBase : public Display { Q_OBJECT public: diff --git a/src/rviz/message_filter_display.h b/src/rviz/message_filter_display.h index 39745a69a9..9d6bbde9cc 100644 --- a/src/rviz/message_filter_display.h +++ b/src/rviz/message_filter_display.h @@ -42,6 +42,7 @@ #include "rviz/properties/ros_topic_property.h" #include "rviz/display.h" +#include "rviz/rviz_export.h" namespace rviz { @@ -49,7 +50,7 @@ namespace rviz /** @brief Helper superclass for MessageFilterDisplay, needed because * Qt's moc and c++ templates don't work nicely together. Not * intended to be used directly. */ -class _RosTopicDisplay: public Display +class RVIZ_EXPORT _RosTopicDisplay: public Display { Q_OBJECT public: diff --git a/src/rviz/ogre_helpers/axes.h b/src/rviz/ogre_helpers/axes.h index 69e9dc8bbc..3a67ed2bfe 100644 --- a/src/rviz/ogre_helpers/axes.h +++ b/src/rviz/ogre_helpers/axes.h @@ -31,6 +31,7 @@ #define OGRE_TOOLS_AXES_H #include "object.h" +#include "rviz/rviz_export.h" #include #include @@ -55,7 +56,7 @@ class Shape; * \class Axes * \brief An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue */ -class Axes : public Object +class RVIZ_EXPORT Axes : public Object { public: /** diff --git a/src/rviz/ogre_helpers/object.h b/src/rviz/ogre_helpers/object.h index 0391ac0dd4..9809677922 100644 --- a/src/rviz/ogre_helpers/object.h +++ b/src/rviz/ogre_helpers/object.h @@ -30,6 +30,8 @@ #ifndef OGRE_TOOLS_OBJECT_H #define OGRE_TOOLS_OBJECT_H +#include "rviz/rviz_export.h" + namespace Ogre { class SceneManager; @@ -46,7 +48,7 @@ namespace rviz * \class Object * \brief Base class for visible objects, providing a minimal generic interface. */ -class Object +class RVIZ_EXPORT Object { public: /** diff --git a/src/rviz/ogre_helpers/render_system.h b/src/rviz/ogre_helpers/render_system.h index c9432379cd..88d348371f 100644 --- a/src/rviz/ogre_helpers/render_system.h +++ b/src/rviz/ogre_helpers/render_system.h @@ -39,6 +39,8 @@ #include #include +#include "rviz/rviz_export.h" + #ifndef _WIN32 # pragma GCC diagnostic pop #endif @@ -52,7 +54,7 @@ namespace Ogre namespace rviz { -class RenderSystem +class RVIZ_EXPORT RenderSystem { public: diff --git a/src/rviz/panel.h b/src/rviz/panel.h index 15210d8356..9686afe48f 100644 --- a/src/rviz/panel.h +++ b/src/rviz/panel.h @@ -32,13 +32,14 @@ #include #include "rviz/config.h" +#include "rviz/rviz_export.h" namespace rviz { class VisualizationManager; -class Panel: public QWidget +class RVIZ_EXPORT Panel: public QWidget { Q_OBJECT public: diff --git a/src/rviz/panel_dock_widget.h b/src/rviz/panel_dock_widget.h index 5888f6d4e3..f395d62515 100644 --- a/src/rviz/panel_dock_widget.h +++ b/src/rviz/panel_dock_widget.h @@ -31,6 +31,7 @@ #define RVIZ_PANEL_DOCK_WIDGET_H #include "rviz/config.h" +#include "rviz/rviz_export.h" #include #include @@ -43,7 +44,7 @@ namespace rviz * Use setContentWidget() instead of QDockWidget::setWidget() if you * want the PanelDockWidget to be destroyed when the content widget is * destroyed. */ -class PanelDockWidget: public QDockWidget +class RVIZ_EXPORT PanelDockWidget: public QDockWidget { Q_OBJECT public: diff --git a/src/rviz/properties/bool_property.h b/src/rviz/properties/bool_property.h index 045f5fa416..d4194c69f5 100644 --- a/src/rviz/properties/bool_property.h +++ b/src/rviz/properties/bool_property.h @@ -30,12 +30,13 @@ #define BOOL_PROPERTY_H #include "rviz/properties/property.h" +#include "rviz/rviz_export.h" namespace rviz { /** @brief Property specialized to provide getter for booleans. */ -class BoolProperty: public Property +class RVIZ_EXPORT BoolProperty: public Property { Q_OBJECT public: diff --git a/src/rviz/properties/property.h b/src/rviz/properties/property.h index 5643031f62..2b372325b4 100644 --- a/src/rviz/properties/property.h +++ b/src/rviz/properties/property.h @@ -36,6 +36,7 @@ #include #include "rviz/config.h" +#include "rviz/rviz_export.h" class QModelIndex; class QPainter; @@ -97,7 +98,7 @@ class PropertyTreeModel; * To show a Property tree in a PropertyTreeWidget, wrap the root * Property in a PropertyTreeModel and call * PropertyTreeWidget::setModel() with it. */ -class Property: public QObject +class RVIZ_EXPORT Property: public QObject { Q_OBJECT public: diff --git a/src/rviz/properties/property_tree_widget.h b/src/rviz/properties/property_tree_widget.h index 8d0a06c97c..437857a5ee 100644 --- a/src/rviz/properties/property_tree_widget.h +++ b/src/rviz/properties/property_tree_widget.h @@ -33,6 +33,7 @@ #include "rviz/config.h" #include "rviz/properties/property_tree_model.h" +#include "rviz/rviz_export.h" namespace rviz { @@ -40,7 +41,7 @@ namespace rviz class Property; class SplitterHandle; -class PropertyTreeWidget: public QTreeView +class RVIZ_EXPORT PropertyTreeWidget: public QTreeView { Q_OBJECT public: diff --git a/src/rviz/properties/ros_topic_property.h b/src/rviz/properties/ros_topic_property.h index 0a5a485b5c..7729e9b213 100644 --- a/src/rviz/properties/ros_topic_property.h +++ b/src/rviz/properties/ros_topic_property.h @@ -32,11 +32,12 @@ #include #include "rviz/properties/editable_enum_property.h" +#include "rviz/rviz_export.h" namespace rviz { -class RosTopicProperty: public EditableEnumProperty +class RVIZ_EXPORT RosTopicProperty: public EditableEnumProperty { Q_OBJECT public: diff --git a/src/rviz/properties/tf_frame_property.h b/src/rviz/properties/tf_frame_property.h index f9dde17399..db1519f959 100644 --- a/src/rviz/properties/tf_frame_property.h +++ b/src/rviz/properties/tf_frame_property.h @@ -32,13 +32,14 @@ #include #include "rviz/properties/editable_enum_property.h" +#include "rviz/rviz_export.h" namespace rviz { class FrameManager; -class TfFrameProperty: public EditableEnumProperty +class RVIZ_EXPORT TfFrameProperty: public EditableEnumProperty { Q_OBJECT public: diff --git a/src/rviz/properties/vector_property.h b/src/rviz/properties/vector_property.h index e7eb00d1f2..6934de615b 100644 --- a/src/rviz/properties/vector_property.h +++ b/src/rviz/properties/vector_property.h @@ -32,11 +32,12 @@ #include #include "rviz/properties/property.h" +#include "rviz/rviz_export.h" namespace rviz { -class VectorProperty: public Property +class RVIZ_EXPORT VectorProperty: public Property { Q_OBJECT public: diff --git a/src/rviz/selection/selection_handler.h b/src/rviz/selection/selection_handler.h index 32b30535ec..ea5c43a285 100644 --- a/src/rviz/selection/selection_handler.h +++ b/src/rviz/selection/selection_handler.h @@ -44,6 +44,7 @@ #include "rviz/selection/selection_handler.h" #include "rviz/viewport_mouse_event.h" #include "rviz/interactive_object.h" +#include "rviz/rviz_export.h" namespace Ogre { @@ -61,7 +62,7 @@ class ViewportMouseEvent; typedef std::vector V_AABB; -class SelectionHandler +class RVIZ_EXPORT SelectionHandler { public: SelectionHandler( DisplayContext* context ); diff --git a/src/rviz/selection/selection_manager.h b/src/rviz/selection/selection_manager.h index 6f653786fd..0cd8713430 100644 --- a/src/rviz/selection/selection_manager.h +++ b/src/rviz/selection/selection_manager.h @@ -36,6 +36,7 @@ #include "forwards.h" #include "selection_handler.h" +#include "rviz/rviz_export.h" #ifndef Q_MOC_RUN #include @@ -77,7 +78,7 @@ class PropertyTreeModel; class ViewportMouseEvent; class VisualizationManager; -class SelectionManager: public QObject, public Ogre::MaterialManager::Listener, public Ogre::RenderQueueListener +class RVIZ_EXPORT SelectionManager: public QObject, public Ogre::MaterialManager::Listener, public Ogre::RenderQueueListener { Q_OBJECT public: diff --git a/src/rviz/tool.h b/src/rviz/tool.h index 66db59a434..fdb2ca8f38 100644 --- a/src/rviz/tool.h +++ b/src/rviz/tool.h @@ -36,6 +36,7 @@ #include #include "rviz/config.h" +#include "rviz/rviz_export.h" class QMouseEvent; class QKeyEvent; @@ -52,7 +53,7 @@ class Property; class RenderPanel; class ViewportMouseEvent; -class Tool : public QObject +class RVIZ_EXPORT Tool : public QObject { Q_OBJECT public: diff --git a/src/rviz/tool_manager.h b/src/rviz/tool_manager.h index 60b2cf72a6..ba6f4d12ed 100644 --- a/src/rviz/tool_manager.h +++ b/src/rviz/tool_manager.h @@ -35,6 +35,7 @@ #include "rviz/pluginlib_factory.h" #include "rviz/tool.h" +#include "rviz/rviz_export.h" class QKeyEvent; @@ -44,7 +45,7 @@ class DisplayContext; class PropertyTreeModel; class RenderPanel; -class ToolManager: public QObject +class RVIZ_EXPORT ToolManager: public QObject { Q_OBJECT public: diff --git a/src/rviz/view_controller.h b/src/rviz/view_controller.h index 8b1d986bc0..5bc7823018 100644 --- a/src/rviz/view_controller.h +++ b/src/rviz/view_controller.h @@ -35,6 +35,7 @@ #include #include "rviz/properties/property.h" +#include "rviz/rviz_export.h" class QKeyEvent; @@ -55,7 +56,7 @@ class ViewportMouseEvent; class FloatProperty; class BoolProperty; -class ViewController: public Property +class RVIZ_EXPORT ViewController: public Property { Q_OBJECT public: diff --git a/src/rviz/view_manager.h b/src/rviz/view_manager.h index 6cdd242b5d..a4c7250473 100644 --- a/src/rviz/view_manager.h +++ b/src/rviz/view_manager.h @@ -35,6 +35,7 @@ #include "rviz/pluginlib_factory.h" #include "rviz/view_controller.h" +#include "rviz/rviz_export.h" namespace Ogre { @@ -49,7 +50,7 @@ class PropertyTreeModel; class ViewController; class ViewControllerContainer; -class ViewManager: public QObject +class RVIZ_EXPORT ViewManager: public QObject { Q_OBJECT public: diff --git a/src/rviz/visualization_frame.h b/src/rviz/visualization_frame.h index 2d9d777f05..1f6d69d820 100644 --- a/src/rviz/visualization_frame.h +++ b/src/rviz/visualization_frame.h @@ -41,6 +41,7 @@ #include "rviz/config.h" #include "rviz/window_manager_interface.h" #include "rviz/panel.h" +#include "rviz/rviz_export.h" #include @@ -71,7 +72,7 @@ class WidgetGeometryChangeDetector; * the top is a toolbar with "Move Camera", "Select", etc. There is * also a menu bar with file/open, etc. */ -class VisualizationFrame : public QMainWindow, public WindowManagerInterface +class RVIZ_EXPORT VisualizationFrame : public QMainWindow, public WindowManagerInterface { Q_OBJECT public: diff --git a/src/rviz/visualization_manager.h b/src/rviz/visualization_manager.h index 4b983d490c..6e2f557c9e 100644 --- a/src/rviz/visualization_manager.h +++ b/src/rviz/visualization_manager.h @@ -38,6 +38,7 @@ #include "rviz/bit_allocator.h" #include "rviz/config.h" #include "rviz/display_context.h" +#include "rviz/rviz_export.h" class QKeyEvent; class QTimer; @@ -97,7 +98,7 @@ class VisualizationManagerPrivate; * The "protected" members should probably all be "private", as * VisualizationManager is not intended to be subclassed. */ -class VisualizationManager: public DisplayContext +class RVIZ_EXPORT VisualizationManager: public DisplayContext { Q_OBJECT public: diff --git a/src/rviz/visualizer_app.h b/src/rviz/visualizer_app.h index 50b54624e5..4ee1341118 100644 --- a/src/rviz/visualizer_app.h +++ b/src/rviz/visualizer_app.h @@ -34,6 +34,7 @@ #ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829 # include +# include #endif class QTimer; @@ -43,7 +44,7 @@ namespace rviz class VisualizationFrame; -class VisualizerApp: public QObject +class RVIZ_EXPORT VisualizerApp: public QObject { Q_OBJECT public: