<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Excellent approach. &nbsp;Thank you.<div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>KC Jones</div><div><a href="mailto:kc.jones@skype.net">kc.jones@skype.net</a></div><div>SkypeId: bernalkc</div></div></span></span>
</div>
<br><div><div>On Jan 6, 2011, at 5:55 AM, Ryan Pavlik wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">You'll need something closer to this:<div><br></div><div><br><div>add_executable(myapp MACOSX_BUNDLE [...])</div><div><br></div><div>find_file(helperpath [...])</div><div>if(NOT helperpath)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>message(FATAL_ERROR "Need helper app!")</div>
<div>endif()</div><div><br></div><div>install(TARGETS myapp</div><div>&nbsp;&nbsp; BUNDLE DESTINATION .</div><div>&nbsp;&nbsp; RUNTIME DESTINATION bin</div><div>)</div><div><br></div><div>if(APPLE)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>install(PROGRAMS ${helperpath}</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; DESTINATION ./myapp.app/Contents/MacOS</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>)</div><div>else()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>install(PROGRAMS ${helperpath}</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp; DESTINATION bin</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>)</div><div>endif()</div><div class="gmail_quote">On Wed, Jan 5, 2011 at 9:22 PM, Michael Jackson <span dir="ltr">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Can you use "Find_File()" to get the path to the file. Then use the install(FILES ... ) command to place the file in your app bundle. Not tried any of that but it might work.<br>

___________________________________________________________<br>
Mike Jackson &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.bluequartz.net/" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer &nbsp; &nbsp; &nbsp; <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dayton, Ohio<br>
<div><div></div><div class="h5"><br>
On Jan 5, 2011, at 9:13 PM, KC Jones wrote:<br>
<br>
&gt; I'm building an app on Mac, Linux, and Win.<br>
&gt;<br>
&gt; My application requires that a helper application, built outside of my project, be installed along with it. &nbsp;On Linux and Win, its sufficient to copy the helper app to the same directory as my app. &nbsp;On Mac, it needs to be copied into the bundle in the same location as my runtime, in the Contents/Macos/ bundle directory.<br>

&gt;<br>
&gt; I can't get the helper app to be packaged correctly on Mac. &nbsp;I've tried two approaches that have come close but failed.<br>
&gt;<br>
&gt; First I tried adding the helper as a target, then using install(TARGETS...):<br>
&gt; ----------------------------------------<br>
&gt; ADD_EXECUTABLE(myapp MACOSX_BUNDLE [...])<br>
&gt;<br>
&gt; SET(helperpath [...])<br>
&gt; SET(IMPORTED_LOCATION ${helperpath})<br>
&gt; ADD_EXECUTABLE(myhelper IMPORTED)<br>
&gt;<br>
&gt; INSTALL(TARGETS myapp<br>
&gt; &nbsp; &nbsp;BUNDLE DESTINATION .<br>
&gt; &nbsp; &nbsp;RUNTIME DESTINATION bin<br>
&gt; )<br>
&gt;<br>
&gt; INSTALL(TARGETS myhelper<br>
&gt; &nbsp; &nbsp;BUNDLE DESTINATION .<br>
&gt; &nbsp; &nbsp;RUNTIME DESTINATION bin<br>
&gt; )<br>
&gt; ----------------------------------------<br>
&gt;<br>
&gt; This fails in cmake with a message: "install TARGETS given target "myhelper" which does not exist in this directory."<br>
&gt;<br>
&gt; If &nbsp;I alter the INSTALL with a fully qualified path to myhelper I get the same message, with the fully qualified myhelper path.<br>
&gt;<br>
&gt; Next, I tried using INSTALL(PROGRAMS...) with something like:<br>
&gt; ----------------------------------------<br>
&gt; ADD_EXECUTABLE(myapp MACOSX_BUNDLE [...])<br>
&gt;<br>
&gt; SET(helperpath [...])<br>
&gt;<br>
&gt; INSTALL(TARGETS myapp<br>
&gt; &nbsp; &nbsp;BUNDLE DESTINATION .<br>
&gt; &nbsp; &nbsp;RUNTIME DESTINATION bin<br>
&gt; )<br>
&gt;<br>
&gt; INSTALL(PROGRAMS ${helperpath}/myhelper<br>
&gt; &nbsp; &nbsp;DESTINATION .<br>
&gt; )<br>
&gt; ----------------------------------------<br>
&gt;<br>
&gt; But this form PROGRAMS does not support the kind-of qualifiers (BUNDLE, RUNTIME), so helperapp gets copied next to the bundle on Mac, not into it where it needs to be.<br>
&gt;<br>
&gt; What am I doing wrong?<br>
&gt;<br>
&gt; KC Jones<br>
&gt; <a href="mailto:kc.jones@skype.net">kc.jones@skype.net</a><br>
&gt; SkypeId: bernalkc<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ryan Pavlik<br>HCI Graduate Student<br>Virtual Reality Applications Center<br>Iowa State University<br><br><a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a><br>
<a href="http://academic.cleardefinition.com/">http://academic.cleardefinition.com</a><br>Internal VRAC/HCI Site: <a href="http://tinyurl.com/rpavlik">http://tinyurl.com/rpavlik</a><br>
</div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></blockquote></div><br></div></div></body></html>