<br><br><div class="gmail_quote">2010/5/15 Tyler Roscoe <span dir="ltr">&lt;<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

[...]<br><div class="im">On Sat, May 15, 2010 at 05:53:45PM +0200, Baptiste Lepilleur wrote:<br>
&gt; Alternatively, is it possible to delay variable expansion until the<br>
&gt; cmake_install.cmake script is invoked?<br>
<br>
</div>I think what I use to solve this problem (can&#39;t check right now) is<br>
\${CMAKE_BUILD_TYPE}. This sticks &quot;${CMAKE_BUILD_TYPE}&quot; into<br>
cmake_install.cmake, which is then correctly interpreted at install<br>
time.<br>
<font color="#888888"></font></blockquote><div><br>Thanks, the \${VAR} trick works great to delay variable expansion. Though, CMAKE_BUILD_TYPE also expand to an empty variable. Using either BUILD_TYPE or CMAKE_INSTALL_CONFIG_NAME variable works. I think I&#39;m going to stick with CMAKE_INSTALL_CONFIG_NAME since the script go through great length to make sure it is initialized. Though none of those variables are documented.<br>

<br>So the final installation command that install the library in a matching sub-directory matching the configuration used in the IDE is:<br><br>install(TARGETS unrar_lib<br>    RUNTIME DESTINATION bin/\${CMAKE_INSTALL_CONFIG_NAME}<br>

    ARCHIVE DESTINATION lib/\${CMAKE_INSTALL_CONFIG_NAME}<br>    LIBRARY DESTINATION lib/\${CMAKE_INSTALL_CONFIG_NAME}<br>)<br><br>Baptiste.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<font color="#888888">
tyler<br>
</font></blockquote></div><br>