title: CMake and Qt5 AUTOMOC error
body: <p>I have a project which uses Qt5 and I have a <code>CMakeLists.txt</code> file that I use for creating the Visual Studio Solution.</p>
  
  <p>This is an excerpt of my <code>CMakeLists.txt</code></p>
  
  <pre><code>cmake_policy(SET CMP0020 NEW)
  set(CMAKE_AUTOMOC ON)
  find_package(Qt5 REQUIRED COMPONENTS core widgets)
  
  set(COMMON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/src)
  
  include_directories( ${Boost_INCLUDE_DIRS}
      ${COMMON_INCLUDE_DIR}
  )
  
  
  file(GLOB_RECURSE COMMON_SOURCE "*.hpp" "*.cpp")
  add_library(${PROJECT_NAME} ${COMMON_SOURCE})
  qt5_use_modules(${PROJECT_NAME} Widgets)
  </code></pre>
  
  <p>When I try to compile the code it returns the following error:</p>
  
  <pre><code>&gt;AUTOMOC : error : C:/Users/.../Projects/MyProject/build/MyProjects_automoc.cpp The file includes the moc file "moc_MyFile.cpp", but could not find header "MyFile{.h,.hh,.h++,.hm,.hpp,.hxx,.in,.txx}" in C:/Users/.../Projects/MyProject/build/
  </code></pre>
  
  <p>The moc file have been auto-generated and the header is not in the build folder, but in a folder locate in the src directory.</p>
  
  <p>How is possible to fix this error?</p>