CMake uses the &quot;language&quot; of the source files compiled for an executable to determine what variable to use for the link stage... So, in the normal C++ case, CMAKE_CXX_LINK_EXECUTABLE would be used.<br><br>In the general case, where an executable is built solely with &quot;language&quot; source files, the variable CMAKE_${language}_LINK_EXECUTABLE is used to compute the link command.
<br><br>You could try this prior to your ADD_EXECUTABLE call:<br>SET(CMAKE_RC_LINK_EXECUTABLE &quot;${CMAKE_CXX_LINK_EXECUTABLE}&quot;)<br><br>Or you could try adding an empty &quot;dummy.cxx&quot; file to your ADD_EXECUTABLE command.
<br><br>HTH,<br>David<br><br><div><span class="gmail_quote">On 1/10/07, <b class="gmail_sendername">Gerhard Grimm</b> &lt;<a href="mailto:ggrimm@detec.de">ggrimm@detec.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello there,<br><br>using CMake 2.4.5 on Windows, I&#39;m trying to build a resource-only executable<br>(required for Windows Installer setup authoring).<br>My source directory contains an icon resource &quot;test.ico&quot;, a resource script
<br>&quot;test.rc&quot; and a &quot;CMakeLists.txt&quot; file:<br><br>--------------------------------------------------------------<br>include(AddFileDependencies)<br><br>add_executable(test test.rc)<br>add_file_dependencies(
test.rc test.ico)<br>set_target_properties(test<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PROPERTIES LINK_FLAGS &quot;/DLL /NOENTRY&quot;)<br>--------------------------------------------------------------<br><br>Running &#39;cmake -G &quot;NMake Makefiles&quot; .&#39; in the source directory yields the
<br>output:<br><br>[...compiler checks skipped here...]<br>-- Configuring done<br>CMake Error: Error required internal CMake variable not set, cmake may be not be<br> built correctly.<br>Missing variable is:<br>CMAKE_RC_LINK_EXECUTABLE
<br>-- Generating done<br>-- Build files have been written to: D:/Projekte/CMake_bug<br><br>The very same CMakeLists.txt works with the generator for Visual Studio .NET<br>projects, and &quot;text.exe&quot; can be built successfully.
<br><br>Can I set the missing internal variable by myself, and if yes,<br>what would I need to set it to?<br><br>Best regards,<br><br>Gerhard<br>_______________________________________________<br>CMake mailing list<br><a href="mailto:CMake@cmake.org">
CMake@cmake.org</a><br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>