find_package catkin several times
Hi all, let's say I have a catkin package which builds several executables.
Each one of these executables depends on a different set of catkin packages (i.e. catkin CMake components).
How can I link properly these executables? Is it ok to call find_package(catkin REQUIRED COMPONENTS ...)
several times?
E.g.,
cmake_minimum_required(VERSION 2.8.3)
project(myproject)
find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs)
add_executable(myexec1 myexec1.cpp)
target_link_libraries(myexec1 ${catkin_LIBRARIES})
find_package(catkin REQUIRED COMPONENTS roscpp std_msgs)
add_executable(myexec2 myexec2.cpp)
target_link_libraries(myexec2 ${catkin_LIBRARIES})
how about the include_directories
statements?