<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
</div>You&#39;re right about the explicit listing, but you should do the copying<br>
using configure_file(... COPYONLY). And don&#39;t even think about using<br>
file(GLOB) and friends, that&#39;s usually the wrong approach.<br><font class="Apple-style-span" color="#888888"><br></font></blockquote><div><br></div><div>The problem is that those files can be modified by the user and in that case obviously the sources should be recompiled, so I ended with an approach similar to the one for the .idl interfaces, the only thing I don&#39;t like is that those small targets are listed as % points of the progress of the build, anyway it&#39;s really impressive the flexibility of cmake!</div>
<div><br></div><div><br></div></div><div>MACRO (MACRO_ADD_CUSTOMIZED)</div><div> FOREACH(_in_FILE ${ARGN})</div><div><br></div><div>   GET_FILENAME_COMPONENT(_out_DIR ${_in_FILE} PATH)</div><div>   GET_FILENAME_COMPONENT(_out_FILE ${_in_FILE} NAME_WE)</div>
<div><br></div><div>   ADD_CUSTOM_COMMAND(</div><div>     OUTPUT ${PROJECT_BINARY_DIR}/inc/intf/${_out_DIR}/${_out_FILE}.h</div><div>     DEPENDS ${PROJECT_SOURCE_DIR}/inc/intf/${_in_FILE}</div><div>     COMMAND mkdir -p &quot;${PROJECT_BINARY_DIR}/inc/intf/${_out_DIR}&quot;</div>
<div>     COMMAND cp &quot;${PROJECT_SOURCE_DIR}/inc/intf/${_in_FILE}&quot; &quot;${PROJECT_BINARY_DIR}/inc/intf/${_out_DIR}&quot;</div><div>   )</div><div><br></div><div>   SET_SOURCE_FILES_PROPERTIES(</div><div>     ${PROJECT_BINARY_DIR}/inc/intf/${_out_DIR}/${_out_FILE}.h</div>
<div>     PROPERTIES</div><div>     GENERATED TRUE</div><div>   )</div><div><br></div><div>   ADD_CUSTOM_TARGET(${_out_FILE} DEPENDS ${PROJECT_BINARY_DIR}/inc/intf/${_out_DIR}/${_out_FILE}.h)</div><div><br></div><div>   add_dependencies(idl ${_out_FILE} )</div>
<div> ENDFOREACH(_in_FILE ${ARGN})</div><div><br></div><div><br></div><div><div>MACRO_ADD_CUSTOMIZED(AckNak/AckNakImpl.h          GlacToGcrf/GlacToGcrfImpl.h        SfdToVld/SfdToVldImpl.h</div><div>        AckNak/AckNakIntf.h          GlacToGcrf/GlacToGcrfIntf.h        SfdToVld/SfdToVldIntf.h</div>
<div>        FromASII/FromASIIImpl.h      GlacToGtr/GlacToGtrImpl.h          SubToMaster/SubToMasterImpl.h</div><div>        FromASII/FromASIIIntf.h      GlacToGtr/GlacToGtrIntf.h          SubToMaster/SubToMasterIntf.h</div>
<div>        FromGRL/FromGRLImpl.h        GrfToGcrf/GrfToGcrfImpl.h          SupvToMonitor/SupvToMonitorImpl.h</div><div>        FromGRL/FromGRLIntf.h        GrfToGcrf/GrfToGcrfIntf.h          SupvToMonitor/SupvToMonitorIntf.h</div>
<div>        FromTLP/FromTLPImpl.h        GtlrToGtr/GtlrToGtrImpl.h          TechInterface/TechInterfaceImpl.h</div><div>        FromTLP/FromTLPIntf.h        GtlrToGtr/GtlrToGtrIntf.h          TechInterface/TechInterfaceIntf.h</div>
<div>        FromTTL/FromTTLImpl.h        GtrToGcfg/GtrToGcfgImpl.h          ToASII/ToASIIImpl.h</div><div>        FromTTL/FromTTLIntf.h        GtrToGcfg/GtrToGcfgIntf.h          ToASII/ToASIIIntf.h</div><div>        GcfgToGfg/GcfgToGfgImpl.h    GtrToGcrf/GtrToGcrfImpl.h          ToCLK/ToCLKImpl.h</div>
<div>        GcfgToGfg/GcfgToGfgIntf.h    GtrToGcrf/GtrToGcrfIntf.h          ToCLK/ToCLKIntf.h</div><div>        GcfgToGtr/GcfgToGtrImpl.h    GtrToGcrl/GtrToGcrlImpl.h          ToGprotoIdle/ToGprotoIdleImpl.h</div><div>        GcfgToGtr/GcfgToGtrIntf.h    GtrToGcrl/GtrToGcrlIntf.h          ToGprotoIdle/ToGprotoIdleIntf.h</div>
<div>        GcrfToGlac/GcrfToGlacImpl.h  GtrToGlac/GtrToGlacImpl.h          ToGprotoNull/ToGprotoNullImpl.h</div><div>        GcrfToGlac/GcrfToGlacIntf.h  GtrToGlac/GtrToGlacIntf.h          ToGprotoNull/ToGprotoNullIntf.h</div>
<div>        GcrfToGrf/GcrfToGrfImpl.h    GtrToGmsg/GtrToGmsgImpl.h          ToGprotoReady/ToGprotoReadyImpl.h</div><div>        GcrfToGrf/GcrfToGrfIntf.h    GtrToGmsg/GtrToGmsgIntf.h          ToGprotoReady/ToGprotoReadyIntf.h</div>
<div>        GcrfToGtr/GcrfToGtrImpl.h    GtrToGtlr/GtrToGtlrImpl.h          ToTLP/ToTLPImpl.h</div><div>        GcrfToGtr/GcrfToGtrIntf.h    GtrToGtlr/GtrToGtlrIntf.h          ToTLP/ToTLPIntf.h</div><div>        GcrlToGrl/GcrlToGrlImpl.h    MasterToSub/MasterToSubImpl.h      ToTTL/ToTTLImpl.h</div>
<div>        GcrlToGrl/GcrlToGrlIntf.h    MasterToSub/MasterToSubIntf.h      ToTTL/ToTTLIntf.h</div><div>        GcrlToGtr/GcrlToGtrImpl.h    MonitorToSupv/MonitorToSupvImpl.h  VldToProc/VldToProcImpl.h</div><div>        GcrlToGtr/GcrlToGtrIntf.h    MonitorToSupv/MonitorToSupvIntf.h  VldToProc/VldToProcIntf.h</div>
<div>        GfgToGcfg/GfgToGcfgImpl.h    ProcToVld/ProcToVldImpl.h          VldToSfd/VldToSfdImpl.h</div><div>        GfgToGcfg/GfgToGcfgIntf.h    ProcToVld/ProcToVldIntf.h          VldToSfd/VldToSfdIntf.h</div><div>    )             </div>
</div><br>-- <br>Ing. Gabriele Greco, DARTS Engineering<br>Tel: +39-0105761240  Fax: +39-0105760224<br>s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)<br>