So when I compile a regular C file, XCode puts the resulting object file here:<br><br>/code/myproj/src/MyProj.build/Debug/mytarget.build/Objects-normal/i386/main.o<br><br>When I try to compile something else to an object file using an add_custom_command and CMAKE_CFG_INTDIR I get this path:<br>

<br>${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/myfile.o -&gt;<br>/code/myproj/src/Debug/myfile.o<br><br>The I run into problem of the directory /code/myproj/src/Debug/ not existing.<br><br>So I have two choices.<br>
<br>
1. Add the directory creation to the custom command.<br>2. Figure out how to get a path that actually exists.<br><br>What is the preferred method, and does anyone have hints of how to get an actual build path for XCode?<br>

<br>It&#39;s too bad that add_custom_command doesn&#39;t detect that the path to the output file doesn&#39;t exist and make it for me. ;)<br><br>Thanks,<br>James<br>