title: How to set up CMake to build a library for the iPhone
body: <p>I'm trying to use CMake to generate an Xcode configuration for the iPhone by manually setting certain attributes. (Is this even the right way to go about this?) My CMake file looks like:</p>
  
  <pre><code>project(MYLIB)
  set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
  set(CMAKE_CONFIGURATION_TYPES Debug Release Debug-iPhone)
  set(FILES list of my files...)
  
  add_library(mylib FILES)
  
  set(XCODE_ATTRIBUTE_SDKROOT iphoneos2.2.1)
  # more attributes later, I'm just trying to get one to work first
  </code></pre>
  
  <p>First of all, this doesn't seem to work - in the generated Xcode project (I'm running <code>cmake . -G Xcode</code>), <code>SDKROOT</code> is still set to nothing, and so it says "Current Mac OS".</p>
  
  <p>Second, assuming this is the right way to do this, how do I set the attribute only for the configuration <code>Debug-iPhone</code>?</p>