I tried compiling a Gazebo plugin that is a header file (with .h file extension), it says:
CMake Error: CMake can not determine linker language for target: gazebo_ros_moveit_planning_scene
CMake Error: Cannot determine link language for target "gazebo_ros_moveit_planning_scene".
The following is my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(gazebo REQUIRED)
include_directories(${GAZEBO_INCLUDE_DIRS})
link_directories(${GAZEBO_LIBRARY_DIRS})
list(APPEND CMAKE_CXX_FLAGS "${GAZEBO_CXX_FLAGS}")
add_library(gazebo_ros_moveit_planning_scene SHARED gazebo_ros_moveit_planning_scene.h)
target_link_libraries(gazebo_ros_moveit_planning_scene ${GAZEBO_LIBRARIES})
Any suggestions for a fix? P.s. I'm trying to use this plugin: https://github.com/jhu-lcsr-forks/gazebo_ros_pkgs/blob/hydro-devel/gazebo_plugins/include/gazebo_plugins/gazebo_ros_moveit_planning_scene.h#L50-L82
Edit: This is a cross-post of https://groups.google.com/forum/#!msg/moveit-users/C5r9Liqh6rU/qezMdDjoAgAJ, http://answers.gazebosim.org/question/18783/using-gazebo-plugin-with-h-file-type/, and https://stackoverflow.com/questions/49288356/using-gazebo-plugin-with-h-file-type.
Originally posted by stans on ROS Answers with karma: 3 on 2018-03-14
Post score: 0