I tried CMake 2.8.1 and it seems this problem has been resolved although I could not find mention of it in the changelog. It appears as though the output directories of the Xcode targets are now set explicitly by CMake to $(BUILD_DIR)/{Release,Debug,etc}/, removing the EFFECTIVE_PLATFORM_NAME from the path. This works for me as I generate separate Xcode projects for device and simulator.<div>
<br></div><div><br><div class="gmail_quote">On Mon, Apr 12, 2010 at 2:30 PM, Pieter Scholtz <span dir="ltr"><<a href="mailto:pieterscholtz@gmail.com">pieterscholtz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<div><br></div><div>I am trying to compile a CMake project for the iPhone using the Xcode generator. However, Xcode fails to link the target application to some static library targets, assuming the library targets will be dumped in $(BUILD_DIR)/{Debug,Release,etc}/, when in fact they are dumped in $(BUILD_DIR)/{Debug-iphoneos,Release-iphonesimulator,etc}. The "Per-configuration Build Products Path" in the Xcode project is set to $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME), but the CMake Xcode generator does not take EFFECTIVE_PLATFORM_NAME into account when setting CMAKE_CFG_INTDIR. Furthermore, it seems as though the CMAKE_CFG_INTDIR is read-only and cannot be overridden in the iPhone toolchain file. </div>
<div><br></div><div>There is already an open ticket on the CMake bug tracker about this issue:</div><div><a href="http://public.kitware.com/Bug/view.php?id=9117" target="_blank">http://public.kitware.com/Bug/view.php?id=9117</a></div>
<div>
However, the solution in the patch attached to this ticket does not seem to work for CMake 2.8.0. The patch does not specify a filename, I assumed it to be cmGlobalXCodeGenerator.cxx and applied the changes in the patch manually. Any help would be much appreciated.</div>
<div><br></div><div>I am using CMake 2.8.0 with Xcode 3.2.1 and iPhone 3.1.3 SDK. The project compiles successfully using the Makefile generator.</div><div><br></div><div>Regards</div><div>Pieter</div><font color="#888888"><div>
<br></div>
</font></blockquote></div><br></div>