Skip to content

Commit

Permalink
Windows bring up. (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanyen authored and davetcoleman committed Jul 26, 2019
1 parent c586d43 commit 3ea03e7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
22 changes: 14 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
cmake_minimum_required(VERSION 2.8.6)
project(rviz_visual_tools)

add_definitions(-std=c++11)
if(NOT MSVC)
add_compile_options(-std=c++11)
# Warnings
add_definitions(-W -Wall -Wextra
#-Wcast-qual
-Wwrite-strings -Wunreachable-code -Wpointer-arith
-Winit-self -Wredundant-decls
-Wno-unused-parameter -Wno-unused-function)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Warnings
add_definitions(-W -Wall -Wextra
#-Wcast-qual
-Wwrite-strings -Wunreachable-code -Wpointer-arith
-Winit-self -Wredundant-decls
-Wno-unused-parameter -Wno-unused-function)

find_package(catkin REQUIRED COMPONENTS
eigen_conversions
eigen_stl_containers
Expand Down Expand Up @@ -170,6 +171,10 @@ install(
${PROJECT_NAME}_remote_control
LIBRARY DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
ARCHIVE DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION
${CATKIN_GLOBAL_BIN_DESTINATION}
)

# Install header files
Expand All @@ -188,5 +193,6 @@ install(FILES
# Install executables
install(TARGETS ${PROJECT_NAME}_demo ${PROJECT_NAME}_imarker_simple_demo
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
14 changes: 13 additions & 1 deletion include/rviz_visual_tools/rviz_visual_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@
#include <rviz_visual_tools/deprecation.h>
#include <rviz_visual_tools/remote_control.h>

// Import/export for windows dll's and visibility for gcc shared libraries.

#ifdef ROS_BUILD_SHARED_LIBS // ros is being built around shared libraries
#ifdef rviz_visual_tools_EXPORTS // we are building a shared lib/dll
#define RVIZ_VISUAL_TOOLS_DECL ROS_HELPER_EXPORT
#else // we are using shared lib/dll
#define RVIZ_VISUAL_TOOLS_DECL ROS_HELPER_IMPORT
#endif
#else // ros is being built around static libraries
#define RVIZ_VISUAL_TOOLS_DECL
#endif

namespace rviz_visual_tools
{
// Default constants
Expand Down Expand Up @@ -1079,7 +1091,7 @@ class RvizVisualTools
ros::NodeHandle nh_;

// Short name for this class
static const std::string name_;
static RVIZ_VISUAL_TOOLS_DECL const std::string name_;

// Optional remote control
RemoteControlPtr remote_control_;
Expand Down

0 comments on commit 3ea03e7

Please sign in to comment.