<div class="gmail_quote">On Thu, Dec 23, 2010 at 3:59 PM, KC Jones <span dir="ltr">&lt;<a href="mailto:kc.jones@skype.net">kc.jones@skype.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">&gt; Thanks for your comments and questions. May we quote you on that? (&quot;cmake is elegant in the extreme ... great tool&quot;)<br>
<br>
</div>Of course.  Since all the code I work with is published on multiple OSes, cmake is a godsend.  I&#39;m actively working on replacing as much of our legacy build methods with cmake solutions.  The cmake basics have come relatively easily to me.  CPack is another story.<br>

<br>
Once I get through to the end of this tunnel and have learned CPack well enough, I hope to be in a position to offer more constructive contributions to easing this learning curve.  But, like the problem you describe where there is never time for docs and never enough docs, the reality is that when my builds are humming, there will be other tasks waiting -- and the task of &#39;giving back to the community&#39; somehow never rises to the top of the stack.<br>

<br>
One thought that is jangling around in my head right now:<br>
<br>
WRT install(CODE ...) quoting, would it be useful to support the ruby &quot;here document&quot; syntax?<br>
<br>
install(CODE &lt;&lt;xxx<br>
    include(BundleUtilities)<br>
    fixup_bundle(&quot;${APPS}&quot; &quot;${QTPLUGINS}&quot; &quot;${DIRS}&quot;)<br>
xxx<br>
    COMPONENT Runtime)<br>
<br>
Or is variable substitution at cmake execution time more the rule than the exception?<br>
<br>
</blockquote></div><br>I think we&#39;ve somehow favored install(CODE way too much over install(SCRIPT in the examples that we *do* have.<br><br>If there are serious readability problems with any install(CODE chunk because of excessive escaping required, it should be in its own file where it does not need to be escaped, (even if it&#39;s only 1, 2 or 3 lines), and then install(SCRIPT can simply include the file in the very same place where the CODE would have been generated.<br>
<br>So.... have a file, InstallBundle.cmake whose contents are:<br><br>  include(BundleUtilities)<br>  fixup_bundle(&quot;${APPS}&quot; &quot;${QTPLUGINS}&quot; &quot;${DIRS}&quot;)<br>
<br>And then use:<br><br>  install(SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/InstallBundle.cmake COMPONENT Runtime)<br><br>Much easier on the eyes, much nicer in every respect except there&#39;s one extra file in your source tree now. Small price to pay for readability and future maintainability...<br>
<br><br>HTH,<br>David<br><br>