You could look at cmake.
I have a software project that compiles and runs on Linux, Mac and Windows. One or more CMakeLists.txt files can generate project files for XCode, Visual Studio, CodeBlocks and Eclipse for example. Or generate Unix Makefiles if you want to use Geany. Cmake can find all dependencies, if you state correctly what they are.
If you still need the same project in XCode, simply re-generate the project files for XCode from the CMakeLists.txt files. Delete the build directory, and you're left with only source code ready to be built in Visual Studio (hypothetically).
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")