Add a *.rc file to your ADD_EXECUTABLE sources.<div><br></div><div>In the *.rc file, add a line that references the ico file:</div><div><div>IDR_MAINFRAME           ICON                    &quot;res\\CMakeSetupDialog.ico&quot;</div>
<div><br></div><div>(In this example, IDR_MAINFRAME is a #define that gives an integer identifier for the ico resource.)</div><div><br></div><div>See CMake/Source/MFCDialog/CMakeLists.txt and CMakeSetup.rc for an example.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><br><div class="gmail_quote">On Fri, Aug 21, 2009 at 3:33 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;">What would be the &quot;cmake&quot; way of setting an icon (.ico file) as the icon for an executable?<br>
<br>
<br>
_________________________________________________________<br>
Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
Principal Software Engineer                  Dayton, Ohio<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>
</blockquote></div><br></div>