export gazebo lib dirs and plugin lib dirs in cmake config

#616 Merged at e39c2ff
Repository
Branch
gazebo_plugin_lib_cmake
Repository
Branch
gazebo_1.9
Author
  1. John Hsu
Reviewers
Description
No description

Comments (2)

    1. John Hsu author

      without these exports, I got following compile error:

      Linking CXX shared library /home/hsu/projects/catkin_ws/devel/lib/libdefault_robot_hw_sim.so
      cd /home/hsu/projects/catkin_ws/build/gazebo_ros_pkgs/gazebo_ros_control && /usr/bin/cmake -E cmake_link_script CMakeFiles/default_robot_hw_sim.dir/link.txt --verbose=1
      /usr/bin/c++  -fPIC -O3 -DNDEBUG -Wl,-rpath,/home/hsu/local/lib,-rpath,/home/hsu/local/lib/gazebo-1.9/plugins   -shared -Wl,-soname,libdefault_robot_hw_sim.so -o /home/hsu/projects/catkin_ws/devel/lib/libdefault_robot_hw_sim.so CMakeFiles/default_robot_hw_sim.dir/src/default_robot_hw_sim.cpp.o /opt/ros/hydro/lib/libroscpp.so -lpthread -lboost_signals-mt -lboost_filesystem-mt -lboost_system-mt /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_thread-mt /opt/ros/hydro/lib/librosconsole.so -lboost_regex-mt -llog4cxx /opt/ros/hydro/lib/libxmlrpcpp.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_api_plugin.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_paths_plugin.so /opt/ros/hydro/lib/libroslib.so /opt/ros/hydro/lib/libtf.so /opt/ros/hydro/lib/libmessage_filters.so /opt/ros/hydro/lib/libdynamic_reconfigure_config_init_mutex.so /home/hsu/projects/catkin_ws/devel/lib/libvision_reconfigure.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_camera_utils.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_camera.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_multicamera.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_depth_camera.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_openni_kinect.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_gpu_laser.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_laser.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_block_laser.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_p3d.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_imu.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_f3d.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_bumper.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_template.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_projector.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_force.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_joint_trajectory.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_joint_pose_trajectory.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_diff_drive.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_skid_steer_drive.so /opt/ros/hydro/lib/libnodeletlib.so -luuid /opt/ros/hydro/lib/libbondcpp.so /opt/ros/hydro/lib/liburdf.so /opt/ros/hydro/lib/liburdfdom_sensor.so /opt/ros/hydro/lib/liburdfdom_model_state.so /opt/ros/hydro/lib/liburdfdom_model.so /opt/ros/hydro/lib/liburdfdom_world.so /opt/ros/hydro/lib/libconsole_bridge.so /opt/ros/hydro/lib/librosconsole_bridge.so /opt/ros/hydro/lib/libpcl_ros_tf.so /opt/ros/hydro/lib/libpcl_ros_io.so /opt/ros/hydro/lib/libpcl_ros_filters.so -lboost_iostreams-mt /opt/ros/hydro/lib/libpcl_common.so /opt/ros/hydro/lib/libflann_cpp_s.a /opt/ros/hydro/lib/libpcl_kdtree.so /opt/ros/hydro/lib/libpcl_octree.so /opt/ros/hydro/lib/libpcl_search.so /opt/ros/hydro/lib/libpcl_sample_consensus.so /opt/ros/hydro/lib/libpcl_filters.so /opt/ros/hydro/lib/libpcl_tracking.so -lqhull /opt/ros/hydro/lib/libpcl_surface.so /opt/ros/hydro/lib/libpcl_io.so /opt/ros/hydro/lib/libpcl_segmentation.so /opt/ros/hydro/lib/libpcl_visualization.so /opt/ros/hydro/lib/libpcl_features.so /opt/ros/hydro/lib/libpcl_registration.so /opt/ros/hydro/lib/libpcl_keypoints.so /opt/ros/hydro/lib/libimage_transport.so -ltinyxml /opt/ros/hydro/lib/libclass_loader.so -lPocoFoundation -ldl /home/hsu/projects/catkin_ws/devel/lib/libcontroller_manager.so /home/hsu/projects/catkin_ws/devel/lib/librealtime_tools.so -lCameraPlugin /home/hsu/projects/catkin_ws/devel/lib/libMultiCameraPlugin.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_camera_utils.so -lDepthCameraPlugin -lGpuRayPlugin -lRayPlugin -lContactPlugin /opt/ros/hydro/lib/libroscpp.so -lpthread -lboost_signals-mt -lboost_filesystem-mt -lboost_system-mt /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_thread-mt /opt/ros/hydro/lib/librosconsole.so -lboost_regex-mt -llog4cxx /opt/ros/hydro/lib/libxmlrpcpp.so /opt/ros/hydro/lib/libroslib.so /opt/ros/hydro/lib/libtf.so /opt/ros/hydro/lib/libmessage_filters.so /opt/ros/hydro/lib/libdynamic_reconfigure_config_init_mutex.so /opt/ros/hydro/lib/libnodeletlib.so -luuid /opt/ros/hydro/lib/libbondcpp.so /opt/ros/hydro/lib/liburdf.so /opt/ros/hydro/lib/liburdfdom_sensor.so /opt/ros/hydro/lib/liburdfdom_model_state.so /opt/ros/hydro/lib/liburdfdom_model.so /opt/ros/hydro/lib/liburdfdom_world.so /opt/ros/hydro/lib/libconsole_bridge.so /opt/ros/hydro/lib/librosconsole_bridge.so /opt/ros/hydro/lib/libpcl_ros_tf.so /opt/ros/hydro/lib/libpcl_ros_io.so /opt/ros/hydro/lib/libpcl_ros_filters.so -lboost_iostreams-mt /opt/ros/hydro/lib/libpcl_common.so /opt/ros/hydro/lib/libflann_cpp_s.a /opt/ros/hydro/lib/libpcl_kdtree.so /opt/ros/hydro/lib/libpcl_octree.so /opt/ros/hydro/lib/libpcl_search.so /opt/ros/hydro/lib/libpcl_sample_consensus.so /opt/ros/hydro/lib/libpcl_filters.so /opt/ros/hydro/lib/libpcl_tracking.so -lqhull /opt/ros/hydro/lib/libpcl_surface.so /opt/ros/hydro/lib/libpcl_io.so /opt/ros/hydro/lib/libpcl_segmentation.so /opt/ros/hydro/lib/libpcl_visualization.so /opt/ros/hydro/lib/libpcl_features.so /opt/ros/hydro/lib/libpcl_registration.so /opt/ros/hydro/lib/libpcl_keypoints.so /opt/ros/hydro/lib/libimage_transport.so -ltinyxml /opt/ros/hydro/lib/libclass_loader.so -lPocoFoundation -ldl -lgazebo_physics -lgazebo_common -lgazebo_math -lgazebo_rendering -lgazebo_gui -lgazebo_ode -lgazebo_msgs -lgazebo_transport -lsdf -lpthread -Wl,-rpath,/home/hsu/projects/catkin_ws/devel/lib:/opt/ros/hydro/lib: 
      /usr/bin/ld: cannot find -lCameraPlugin
      /usr/bin/ld: cannot find -lDepthCameraPlugin
      /usr/bin/ld: cannot find -lGpuRayPlugin
      /usr/bin/ld: cannot find -lRayPlugin
      /usr/bin/ld: cannot find -lContactPlugin
      collect2: error: ld returned 1 exit status
      make[2]: *** [/home/hsu/projects/catkin_ws/devel/lib/libdefault_robot_hw_sim.so] Error 1
      make[2]: Leaving directory `/home/hsu/projects/catkin_ws/build'
      make[1]: *** [gazebo_ros_pkgs/gazebo_ros_control/CMakeFiles/default_robot_hw_sim.dir/all] Error 2
      make[1]: *** Waiting for unfinished jobs....
      Linking CXX shared library /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_control.so
      cd /home/hsu/projects/catkin_ws/build/gazebo_ros_pkgs/gazebo_ros_control && /usr/bin/cmake -E cmake_link_script CMakeFiles/gazebo_ros_control.dir/link.txt --verbose=1
      /usr/bin/c++  -fPIC -O3 -DNDEBUG -Wl,-rpath,/home/hsu/local/lib,-rpath,/home/hsu/local/lib/gazebo-1.9/plugins   -shared -Wl,-soname,libgazebo_ros_control.so -o /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_control.so CMakeFiles/gazebo_ros_control.dir/src/ros_control_plugin.cpp.o /opt/ros/hydro/lib/libroscpp.so -lpthread -lboost_signals-mt -lboost_filesystem-mt -lboost_system-mt /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_thread-mt /opt/ros/hydro/lib/librosconsole.so -lboost_regex-mt -llog4cxx /opt/ros/hydro/lib/libxmlrpcpp.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_api_plugin.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_paths_plugin.so /opt/ros/hydro/lib/libroslib.so /opt/ros/hydro/lib/libtf.so /opt/ros/hydro/lib/libmessage_filters.so /opt/ros/hydro/lib/libdynamic_reconfigure_config_init_mutex.so /home/hsu/projects/catkin_ws/devel/lib/libvision_reconfigure.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_camera_utils.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_camera.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_multicamera.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_depth_camera.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_openni_kinect.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_gpu_laser.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_laser.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_block_laser.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_p3d.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_imu.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_f3d.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_bumper.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_template.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_projector.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_force.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_joint_trajectory.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_joint_pose_trajectory.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_diff_drive.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_skid_steer_drive.so /opt/ros/hydro/lib/libnodeletlib.so -luuid /opt/ros/hydro/lib/libbondcpp.so /opt/ros/hydro/lib/liburdf.so /opt/ros/hydro/lib/liburdfdom_sensor.so /opt/ros/hydro/lib/liburdfdom_model_state.so /opt/ros/hydro/lib/liburdfdom_model.so /opt/ros/hydro/lib/liburdfdom_world.so /opt/ros/hydro/lib/libconsole_bridge.so /opt/ros/hydro/lib/librosconsole_bridge.so /opt/ros/hydro/lib/libpcl_ros_tf.so /opt/ros/hydro/lib/libpcl_ros_io.so /opt/ros/hydro/lib/libpcl_ros_filters.so -lboost_iostreams-mt /opt/ros/hydro/lib/libpcl_common.so /opt/ros/hydro/lib/libflann_cpp_s.a /opt/ros/hydro/lib/libpcl_kdtree.so /opt/ros/hydro/lib/libpcl_octree.so /opt/ros/hydro/lib/libpcl_search.so /opt/ros/hydro/lib/libpcl_sample_consensus.so /opt/ros/hydro/lib/libpcl_filters.so /opt/ros/hydro/lib/libpcl_tracking.so -lqhull /opt/ros/hydro/lib/libpcl_surface.so /opt/ros/hydro/lib/libpcl_io.so /opt/ros/hydro/lib/libpcl_segmentation.so /opt/ros/hydro/lib/libpcl_visualization.so /opt/ros/hydro/lib/libpcl_features.so /opt/ros/hydro/lib/libpcl_registration.so /opt/ros/hydro/lib/libpcl_keypoints.so /opt/ros/hydro/lib/libimage_transport.so -ltinyxml /opt/ros/hydro/lib/libclass_loader.so -lPocoFoundation -ldl /home/hsu/projects/catkin_ws/devel/lib/libcontroller_manager.so /home/hsu/projects/catkin_ws/devel/lib/librealtime_tools.so -lCameraPlugin /home/hsu/projects/catkin_ws/devel/lib/libMultiCameraPlugin.so /home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_camera_utils.so -lDepthCameraPlugin -lGpuRayPlugin -lRayPlugin -lContactPlugin /opt/ros/hydro/lib/libroscpp.so -lpthread -lboost_signals-mt -lboost_filesystem-mt -lboost_system-mt /opt/ros/hydro/lib/libcpp_common.so /opt/ros/hydro/lib/libroscpp_serialization.so /opt/ros/hydro/lib/librostime.so -lboost_date_time-mt -lboost_thread-mt /opt/ros/hydro/lib/librosconsole.so -lboost_regex-mt -llog4cxx /opt/ros/hydro/lib/libxmlrpcpp.so /opt/ros/hydro/lib/libroslib.so /opt/ros/hydro/lib/libtf.so /opt/ros/hydro/lib/libmessage_filters.so /opt/ros/hydro/lib/libdynamic_reconfigure_config_init_mutex.so /opt/ros/hydro/lib/libnodeletlib.so -luuid /opt/ros/hydro/lib/libbondcpp.so /opt/ros/hydro/lib/liburdf.so /opt/ros/hydro/lib/liburdfdom_sensor.so /opt/ros/hydro/lib/liburdfdom_model_state.so /opt/ros/hydro/lib/liburdfdom_model.so /opt/ros/hydro/lib/liburdfdom_world.so /opt/ros/hydro/lib/libconsole_bridge.so /opt/ros/hydro/lib/librosconsole_bridge.so /opt/ros/hydro/lib/libpcl_ros_tf.so /opt/ros/hydro/lib/libpcl_ros_io.so /opt/ros/hydro/lib/libpcl_ros_filters.so -lboost_iostreams-mt /opt/ros/hydro/lib/libpcl_common.so /opt/ros/hydro/lib/libflann_cpp_s.a /opt/ros/hydro/lib/libpcl_kdtree.so /opt/ros/hydro/lib/libpcl_octree.so /opt/ros/hydro/lib/libpcl_search.so /opt/ros/hydro/lib/libpcl_sample_consensus.so /opt/ros/hydro/lib/libpcl_filters.so /opt/ros/hydro/lib/libpcl_tracking.so -lqhull /opt/ros/hydro/lib/libpcl_surface.so /opt/ros/hydro/lib/libpcl_io.so /opt/ros/hydro/lib/libpcl_segmentation.so /opt/ros/hydro/lib/libpcl_visualization.so /opt/ros/hydro/lib/libpcl_features.so /opt/ros/hydro/lib/libpcl_registration.so /opt/ros/hydro/lib/libpcl_keypoints.so /opt/ros/hydro/lib/libimage_transport.so -ltinyxml /opt/ros/hydro/lib/libclass_loader.so -lPocoFoundation -ldl -lgazebo_physics -lgazebo_common -lgazebo_math -lgazebo_rendering -lgazebo_gui -lgazebo_ode -lgazebo_msgs -lgazebo_transport -lsdf -lpthread -Wl,-rpath,/home/hsu/projects/catkin_ws/devel/lib:/opt/ros/hydro/lib: 
      /usr/bin/ld: cannot find -lCameraPlugin
      /usr/bin/ld: cannot find -lDepthCameraPlugin
      /usr/bin/ld: cannot find -lGpuRayPlugin
      /usr/bin/ld: cannot find -lRayPlugin
      /usr/bin/ld: cannot find -lContactPlugin
      collect2: error: ld returned 1 exit status
      make[2]: *** [/home/hsu/projects/catkin_ws/devel/lib/libgazebo_ros_control.so] Error 1
      make[2]: Leaving directory `/home/hsu/projects/catkin_ws/build'
      make[1]: *** [gazebo_ros_pkgs/gazebo_ros_control/CMakeFiles/gazebo_ros_control.dir/all] Error 2
      make[1]: Leaving directory `/home/hsu/projects/catkin_ws/build'
      make: *** [all] Error 2