<br><br><div class="gmail_quote">2010/5/15 Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></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>
> Alternatively, is it possible to delay variable expansion until the<br>
> cmake_install.cmake script is invoked?<br>
<br>
</div>I think what I use to solve this problem (can't check right now) is<br>
\${CMAKE_BUILD_TYPE}. This sticks "${CMAKE_BUILD_TYPE}" 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'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>