Applied patch to add Eclipse support, #2781.

This commit is contained in:
Brian Gerkey 2010-06-15 01:25:56 +00:00
parent 932647a5fd
commit ac67543dc1
2 changed files with 26 additions and 0 deletions

View File

@ -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

13
core/mk/eclipse.awk Normal file
View File

@ -0,0 +1,13 @@
//{
if(index($0,"VERBOSE=1")>0) {
printf "\t\t\t\t\t<value>VERBOSE=1|"
printf "ROS_ROOT="ENVIRON["ROS_ROOT"]"|"
printf "ROS_PACKAGE_PATH="ENVIRON["ROS_PACKAGE_PATH"]"|"
printf "PYTHONPATH="ENVIRON["PYTHONPATH"]"|"
printf "PATH="ENVIRON["PATH"]"|"
print "</value>"
} else {
print $0
}
}