ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosjava error: Unknown CMake command "add_java_source_dir"

asked 2011-06-18 14:58:09 -0600

Prasad gravatar image

updated 2011-09-01 04:24:21 -0600

Wim gravatar image

Hello,

I am trying to compile a package containing ROSJAVA related code. I am getting an error while compiling the package as below:

mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake .. [rosbuild] Building package eskorta_wifi [rosbuild] Including /opt/ros/diamondback/stacks/ros_comm/clients/rospy/cmake/rospy.cmake [rosbuild] Including /opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake [rosbuild] Including /opt/ros/diamondback/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake CMake Error at CMakeLists.txt:23 (add_java_source_dir): Unknown CMake command "add_java_source_dir".

I have checked the cMakeLists.txt which indicates right directory. It is pointing to /bin directory of the package.

Please suggest If we are doing something wrong.

Prasad

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-06-19 10:06:13 -0600

Lorenz gravatar image

rosjava doesn't seem to be installed correctly. CMake is unable to resolve the macro add_java_source_dir which is part of rosjava's cmake integration. Can you roscd into it? If not, how did you install it? Did you install the ros-diamondback-client-rosjava debian package?

edit flag offensive delete link more

Comments

1
Yes I did. roscd is working. Yes i have installed debian package.
Prasad gravatar image Prasad  ( 2011-06-24 16:12:11 -0600 )edit
0

answered 2012-05-02 02:33:52 -0600

Newbee gravatar image

add this line in your CMakeLists.text set(add_java_source_dir ${PROJECT_SOURCE_DIR}/src)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-06-18 14:58:09 -0600

Seen: 312 times

Last updated: May 02 '12