ROS CMake Error 'catkin_python_setup() called without 'setup.py' in project folder''
I have met that kind of error.
My ROS version is kinetic.
Linux version is Ubuntu.
CMake file is following.
cmake_minimum_required(VERSION 3.0.2)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
)
find_package(Boost REQUIRED COMPONENTS system)
catkin_python_setup()
add_message_files(
FILES
Message1.msg
Message2.msg
)
add_service_files(
FILES
Service1.srv
Service2.srv
)
generate_messages(
DEPENDENCIES
std_msgs
)
generate_dynamic_reconfigure_options(
cfg/DynReconf1.cfg
cfg/DynReconf2.cfg
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES my_first_ros_pkg
CATKIN_DEPENDS roscpp std_msgs
DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_library(my_first_ros_pkg
src/${PROJECT_NAME}/my_first_ros_pkg.cpp
)
add_dependencies(my_first_ros_pkg ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(hello_world_node src/hello_world_node.cpp)
add_dependencies(my_first_ros_pkg_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(my_first_ros_pkg_node
${catkin_LIBRARIES}
)
Error message
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_python_setup.cmake:31 (message):
catkin_python_setup() called without 'setup.py' in project folder '
/home/rosjunu/catkin_ws/src/my_first_ros_pkg'
Call Stack (most recent call first):
my_first_ros_pkg/CMakeLists.txt:23 (catkin_python_setup)
-- Configuring incomplete, errors occurred!
See also "/home/rosjunu/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/rosjunu/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:542: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed