<div dir="ltr">Hello everybody<div><br></div><div style>I&#39;m trying to build a library from source files that are generated at build time. The setup is the following.</div><div style><br></div><div style><span class="" style="background-color:yellow"><span class="" style>Inputfiles</span></span> (Service.thrift)   -&gt; Thrift Compiler/Generator -&gt; Several generated files (gen-<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>/Service.h, gen-<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>/Service.<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>, gen-<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>/Types.h, [possibly more] -&gt; Build Library -&gt; Library (thrift-service.so)</div>

<div style><br></div><div style>The idea is to rebuild the library whenever one of the Service.thrift file changes.</div><div style>The problem is that I don&#39;t know the output of the generated files in advanced so I like to use all the files generated by the generator and pack them in a library.<br>

</div><div style><br></div><div style>I tried to use add_custom_command() but as I don&#39;t know what&#39;s the output of the generator I didn&#39;t succeed.</div><div style><br></div><div style>Is there a way to handle this scenario?</div>

<div style><br></div><div style>Regards</div><div style>Pascal</div><div style><br></div></div>