Hi all, I&#39;m trying to make it so that Release configuration library is installed in lib/Release, and debug configuration library is installed in lib/Debug.<br><br>I initially tried using the variable ${CMAKE_BUILD_TYPE} but it seems to always expand to a blank string, and the doc imply that it does not work with Visual Studio solution as it has multiple configurations. So I switched to ${CMAKE_CFG_INTDIR}:<br>

<br>    install(TARGETS unrar_lib<br>        RUNTIME DESTINATION bin/${CMAKE_CFG_INTDIR}<br>        ARCHIVE DESTINATION lib/${CMAKE_CFG_INTDIR}<br>        LIBRARY DESTINATION lib/${CMAKE_CFG_INTDIR}<br>    )<br><br>But it installs the library in a directory named &quot;$(OutDir)&quot;... <br>

<br>Is there a way to use the configuration name passed to cmake in the install step (e.g. I&#39;ve found out that in Visual Studio the install step invoke &quot;cmake.exe -DBUILD_TYPE=$(OutDir) -P cmake_install.cmake&quot;)? <br>

<br>Alternatively, is it possible to delay variable expansion until the cmake_install.cmake script is invoked?<br><br>What I want to do it simple compiles and install all configurations using a single batch build...<br><br>

Baptiste.<br><br><br>