I have been working within a catkin workspace for ROS and just tried to rebuild it after building another node ("motion_controller.py") within the "motion_controller" package. When I try to rebuild the package, I get the following error:
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_py_LINK_EXECUTABLE
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_py_LINK_EXECUTABLE
make: *** [cmake_check_build_system] Error 1
cd /home/cdegner/create_ws/build/motion_controller; catkin build --get-env motion_controller | catkin env -si /usr/bin/make cmake_check_build_system; cd -
This is the code I have added to the CMAKE.txt file within the package motion_controller, which worked when compiling the package for the first time with just one package.
add_executable(motion_controller src/motion_controller.py)
target_link_libraries(motion_controller ${catkin_LIBRARIES})
set_target_properties(motion_controller PROPERTIES LINKER_LANGUAGE py)
I tried to change the last line above to:
set_target_properties(motion_controller PROPERTIES LINKER_LANGUAGE CMAKE_py_LINK_EXECUTABLE)
and I just get the error
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CMAKE_py_LINK_EXECUTABLE_LINK_EXECUTABLE
CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
Missing variable is:
CMAKE_CMAKE_py_LINK_EXECUTABLE_LINK_EXECUTABLE
make: *** [cmake_check_build_system] Error 1
cd /home/cdegner/create_ws/build/motion_controller; catkin build --get-env motion_controller | catkin env -si /usr/bin/make cmake_check_build_system; cd -
For reference, it is throwing an error for multiple nodes, but the other node was compiling fine before adding the new node.
Error after adding enable_language(py) line: