title: Library headers and #define
body: <p>I wasn't sure what to search for for this one.  So excuse me if this is simple.  But let me outline the scenario and see what answers are out there.</p>
  
  <p>Let's say I have a library which defines a structure like this:</p>
  
  <pre><code>struct Example {
      int a;
  #if B_ENABLED
      int b;
  #endif
  };
  </code></pre>
  
  <p>This header gets installed as a part of the library's installation as a whole.  My question here is that if my library defines B_ENABLED it will have a structure with these two variables included.  <strong>However</strong> if my application does not define this as well.  Then it will interpret the header as defining a struct with only one member.</p>
  
  <p>Is the best way to handle this just to generate some kind of "options" header which would include all of the #defines that were specified in the library build?</p>
  
  <p>My library builds with CMAKE.  So a CMAKE solution for this is <strong>extra credit</strong> =D.</p>