title: cmake doesn't generate Qt moc files using QT4_automoc
body: <p>I'm trying to compile a little test application <a href="http://doc.qt.nokia.com/4.6/layouts-basiclayouts.html" rel="nofollow">basic layout example</a> in Qt using the Visual Studio 2010 compiler on Windows 7.</p>
  
  <p>I'm using cmake (2.8.4) and nmake to build the example, but it fails to generate moc files.
  This leads to a compilation error: </p>
  
  <pre>Cannot open include file: 'dialog.moc': No such file or directory.</pre>
  
  <p>The rules in my CMakeLists.txt which should enable generation of the moc files are: </p>
  
  <pre><code>set(all_SOURCES main.cpp dialog.cpp)
  QT4_AUTOMOC(${all_SOURCES})
  </code></pre>
  
  <p>Any ideas why no moc files are generated or tips to solve this issue?</p>
  
  <p>Thanks!</p>