[ros-users] install destination error with my catkin package

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
+ (text/html)
+ CMakeLists.txt (text/plain)
+ catkin_make-log.txt (text/plain)
Slet denne besked
Besvar denne besked
Skribent: User discussions
Dato:  
Til: ros-users
Emne: [ros-users] install destination error with my catkin package
Hello ROS users,

I installed Groovy and converted my package from rosbuild to catkin
following these instructions.
http://ros.org/wiki/catkin/migrating_from_rosbuild

I wrote my CMakeLists.txt referenced Groovy's sources and CMakeLists.
I run catkin_make, failed about install DESTINATION.

CMake error is
CMake Error at my_package/CMakeLists.txt:18 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"my_package_node".

Install target of My CMakeLists.txt is
# create my_package_node
add_executable(my_package_node src/my_package_node.cpp
src/my_package_uvc/my_package_camera.cpp
src/my_package_uvc/my_package_uvc.cpp)
target_link_libraries(my_package ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
install(TARGETS my_package_node
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

I attached my CMakeLists and catkin_make log.
Where is ${CATKIN_PACKAGE_BIN_DESTINATION}?
What am I doing wrong?

Thanks for reading.

P.S. I could not post this question to ROS Answers, because of my karma.
What is karma?
-
y.suzuki
cmake_minimum_required(VERSION 2.8.3)
project(my_package)

find_package(catkin REQUIRED COMPONENTS sensor_msgs driver_base image_proc dynamic_reconfigure camera_calibration_parsers compressed_image_transport cv_bridge rospack)
find_package(OpenCV REQUIRED)

# include files
include_directories(${catkin_INCLUDE_DIRS})
include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})
include_directories(src/my_package_uvc)
include_directories(${CATKIN_DEVEL_PREFIX}/include/my_package)


# create my_package_node
add_executable(my_package_node src/my_package_node.cpp src/my_package_uvc/my_package_camera.cpp src/my_package_uvc/my_package_uvc.cpp)
target_link_libraries(my_package ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
install(TARGETS my_package_node
        DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)


# define the project                                                            catkin_package(
   INCLUDE_DIRS src/my_package_uvc
   LIBRARIES ${PROJECT_NAME}
   CATKIN-DEPENDS sensor_msgs driver_base image_proc dynamic_reconfigure camera_calibration_parsers compressed_image_transport cv_bridge
   DEPENDS opencv
)


# test
#catkin_add_gtest()    


Moirai@moirai:~/moirai-ws$ catkin_make
Base path: /home/Moirai/moirai-ws
Source space: /home/Moirai/moirai-ws/src
Build space: /home/Moirai/moirai-ws/build
Devel space: /home/Moirai/moirai-ws/devel
Install space: /home/Moirai/moirai-ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/Moirai/moirai-ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/Moirai/moirai-ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.63
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing packages in topological order:
-- ~~ - my_package
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'my_package'
-- ==> add_subdirectory(my_package)
CMake Error at my_package/CMakeLists.txt:18 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"my_package_node".