The CMakeLists.txt file is
cmake_minimum_required(VERSION 2.8.3)
project(My_Examples_pkg)
find_package(catkin REQUIRED COMPONENTS
actionlib
actionlib_msgs
roscpp
)
## Generate actions in the 'action' folder
add_action_files(
FILES
Name.action
)
generate_messages(
DEPENDENCIES
actionlib_msgs
)
catkin_package(
CATKIN_DEPENDS actionlib actionlib_msgs roscpp
)
###########
## Build ##
###########
add_executable(Example1 src/Example1.cpp)
add_dependencies(Example1 ${Example1_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(Example1
${catkin_LIBRARIES}
)
add_dependencies(Example1 my_custom_action_msg_pkg_generate_messages_cpp)
include_directories(
${catkin_INCLUDE_DIRS}
)
I was wondering if we need to add the package containing the custom action to find_package()
? Like this
find_package(catkin REQUIRED COMPONENTS
my_custom_action_msg_pkg
actionlib
actionlib_msgs
roscpp
)
What about catkin_package()
do we need to also add my_custom_action_msg_pkg
there too?
And if it is in another package do we need to add its action file in add_action_files
?
Thanks in advance!