Cannot specify link libraries for target "node_name" which is not built by this project.
I'm trying to use opencv on kinetic. As per 4.1 on this wiki, I had to add a dependency on opencv2 and find_package in the CMakeLists.txt [instructions here].
This is my edited CMakeList.txt. I'm getting
'CMake Error at pc_side/CMakeLists.txt:19 (target_link_libraries):
Cannot specify link libraries for target "pc_side" which is not built by
this project.
-- Configuring incomplete, errors occurred!
See also "/home/user/raspi/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/raspi/build/CMakeFiles/CMakeError.log".
Makefile:906: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(pc_side)
find_package(catkin REQUIRED COMPONENTS
sensor_msgs
cv_bridge
rospy
std_msgs
)
find_package(OpenCV)
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(pc_side ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
catkin_package()
include_directories(
${catkin_INCLUDE_DIRS}
)
Please post the full error output copied from your terminal, not just the main error text.
I've edited the question to show the full error.