title: cmake and GenerateExportHeader
body: <p>I'm trying to use GenerateExportHeader module from cmake.</p>
  
  <p>part of my CmakeLists.txt:</p>
  
  <pre><code>add_compiler_export_flags()
  add_library(gui SHARED ${gui_CPP} ${gui_HPP})
  generate_export_header(gui)
  </code></pre>
  
  <p>it works nice for gui project itself, but when I try to include gui's .h files in another project, an #include "gui_export.h" cannot be find.
  This is obvious as gui_export.h was created in gui's build dir which is not in include path of other projects.</p>
  
  <p>The simple solution would be to add gui's build dir to other project's includes but:
  1. I don't find it as a kosher solution
  2. I could not actually even find how to find out what is the build dir of a target</p>
  
  <p>how can I solve this problem well?</p>