title: Listing include_directories in CMake
body: <p>I have a cmake build in which I'm searching for a bunch of dependencies, i.e. I have many instances of:</p>
  
  <pre><code>FIND_PACKAGE(SomePackage)
  if(SOMEPACKAGE_FOUND)
    include_directories(${SOMEPACKAGE_INCLUDE_DIR})
    link_libraries(${SOMEPACKAGE_LIBRARIES})
  endif(SOMEPACKAGE_FOUND)
  </code></pre>
  
  <p>Now, I want to add a custom command to build a precompiled header file, but to do this I need to know all of the paths added by my <code>include_directories</code> calls. How can I get a list of these directories (preferably with the proper -I/path/to/directory format) so that I can add them to my custom command?</p>