Ogre on OSX with Xcode 4.3.2 pbxcp error
When building ogre with Xcode 4.3 (and probably higher), one may run into this erorr message: /bin/sh: /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp: Not a directory
The reason is that Xcode does not install tools in /Developer anymore. The tools are now available at /Application/Xcode.app. But ogre 1.7 has hardcoded the path to pbxcp in the CMakefiles.
Workaround: Add one line in visualization_common/ogre/Makefile, which patches the ogre CMakeLists.txt
installed_osx: $(SOURCE_DIR)/unpacked
# Replace @executable_path/../... with @rpath/
find $(SOURCE_DIR) -name CMakeLists.txt -exec sed -i bak s:executable_path/../Frameworks:rpath/: {} \;
find $(SOURCE_DIR) -name CMakeLists.txt -exec sed -i bak s:executable_path/../Components:rpath/: {} \;
find $(SOURCE_DIR) -name CMakeLists.txt -exec sed -i bak s:executable_path/../Plugins:rpath/: {} \;
+ find $(SOURCE_DIR) -name CMakeLists.txt -exec sed -i bak s:/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp:/Applications/Xcode.app/Contents//OtherFrameworks/DevToolsCore.framework/Versions/A/Resources/pbxcp: {} \;
mkdir -p $(SOURCE_DIR)/build