From 2d21119af45e5898e7b107b1018e4340cf5482d1 Mon Sep 17 00:00:00 2001 From: Lucas Walter Date: Wed, 13 Mar 2024 10:05:24 -0700 Subject: [PATCH] restore ability to build for noetic --- projects/default/controllers/ros/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/projects/default/controllers/ros/Makefile b/projects/default/controllers/ros/Makefile index ea2b4ddee26..91359841ac3 100644 --- a/projects/default/controllers/ros/Makefile +++ b/projects/default/controllers/ros/Makefile @@ -64,11 +64,20 @@ include/services/%.h: $(WEBOTS_HOME_PATH)/resources/webots_ros/srv/%.srv include @echo "# generating service header" $(notdir $<) $(SILENT)$(PYTHON_COMMAND) headersFromSRV.py $< -INCLUDE = -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include +ifeq ($(ROS_PATH),noetic) + INCLUDE = -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include -isystem /opt/ros/$(ROS_DISTRO)/include +else + INCLUDE = -isystem $(WEBOTS_HOME_PATH)/projects/default/controllers/ros/include +endif # include ros libraries -LIBRARIES += -W -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lboost_system +ifeq ($(ROS_PATH),noetic) + LIBRARIES += -L/opt/ros/$(ROS_DISTRO)/lib -Wl,-rpath-link=/opt/ros/$(ROS_DISTRO)/lib -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lcontroller_manager -lboost_system +else + LIBRARIES += -W -lxmlrpcpp -lcpp_common -lrosconsole_backend_interface -lroscpp -lrosconsole -lrosconsole_log4cxx -lroscpp_serialization -lrostime -lboost_system +endif + ifeq ($(OSTYPE),windows) LIBRARIES += -lws2_32 ifeq ($(MAKECMDGOALS),debug)