title: CMake globbing generated files
body: <p>I'm using <code>asn1c</code> in order to produce from one or more <code>.asn1</code> files a series of <code>.h</code> and <code>.c</code> files into a given folder.</p>
  
  <p>These C files have no correspondence in names with the original <code>asn1</code> files.</p>
  
  <p>These files must be linked together with mine in order to obtain a working executable. I'd love to be able to:</p>
  
  <ul>
  <li>Automatically generate the files in the build directory to avoid polluting the rest of the project (probably done with <code>add_custom_target</code>)</li>
  <li>Specify the dependency of my executable on those files, so that the <code>asn1c</code> executable is automatically run if the files are missing or if one of the <code>.asn1</code> files is updated.</li>
  <li>Automatically add ALL generated files to the compilation of my executable.</li>
  </ul>
  
  <p>Since the generated files are not known in advance it's ok to just glob whatever the contents of the output directory of the <code>asn1c</code> command - as long as the directory is not empty I'm happy.</p>