From ac67543dc1291f9eae8be93f731cd55d276ba1cb Mon Sep 17 00:00:00 2001 From: Brian Gerkey Date: Tue, 15 Jun 2010 01:25:56 +0000 Subject: [PATCH] Applied patch to add Eclipse support, #2781. --- core/mk/cmake.mk | 13 +++++++++++++ core/mk/eclipse.awk | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 core/mk/eclipse.awk diff --git a/core/mk/cmake.mk b/core/mk/cmake.mk index 432bba0f..06696562 100644 --- a/core/mk/cmake.mk +++ b/core/mk/cmake.mk @@ -24,6 +24,7 @@ clean: -cd build && make clean rm -rf msg_gen srv_gen msg/cpp msg/lisp msg/oct msg/java srv/cpp srv/lisp srv/oct srv/java src/$(PACKAGE_NAME)/msg src/$(PACKAGE_NAME)/srv rm -rf build + rm .project .cproject # All other targets are just passed through test: all @@ -35,4 +36,16 @@ test-future: all gcoverage: all cd build && make $@ +eclipse-project: + mv Makefile Makefile.ros + cmake -G"Eclipse CDT4 - Unix Makefiles" -Wno-dev . + rm Makefile + rm CMakeCache.txt + rm -rf CMakeFiles + mv Makefile.ros Makefile + mv .project .project-cmake + awk -f $(shell rospack find mk)/eclipse.awk .project-cmake > .project + rm .project-cmake + + include $(shell rospack find mk)/buildtest.mk diff --git a/core/mk/eclipse.awk b/core/mk/eclipse.awk new file mode 100644 index 00000000..68945a66 --- /dev/null +++ b/core/mk/eclipse.awk @@ -0,0 +1,13 @@ +//{ + if(index($0,"VERBOSE=1")>0) { + printf "\t\t\t\t\tVERBOSE=1|" + printf "ROS_ROOT="ENVIRON["ROS_ROOT"]"|" + printf "ROS_PACKAGE_PATH="ENVIRON["ROS_PACKAGE_PATH"]"|" + printf "PYTHONPATH="ENVIRON["PYTHONPATH"]"|" + printf "PATH="ENVIRON["PATH"]"|" + print "" + } else { + print $0 + } +} +