On Sat, May 15, 2010 at 05:53:45PM +0200, Baptiste Lepilleur wrote:
> 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
Correct.
> to ${CMAKE_CFG_INTDIR}:
>
> install(TARGETS unrar_lib
> RUNTIME DESTINATION bin/${CMAKE_CFG_INTDIR}
> ARCHIVE DESTINATION lib/${CMAKE_CFG_INTDIR}
> LIBRARY DESTINATION lib/${CMAKE_CFG_INTDIR}
> )
>
> But it installs the library in a directory named "$(OutDir)"...
$(OutDir) is a VS "macro" so only VS knows how to interpret it. Since
installation is done by CMake, you can't use CMAKE_CFG_INTDIR there.
> Alternatively, is it possible to delay variable expansion until the
> cmake_install.cmake script is invoked?
I think what I use to solve this problem (can't check right now) is
\${CMAKE_BUILD_TYPE}. This sticks "${CMAKE_BUILD_TYPE}" into
cmake_install.cmake, which is then correctly interpreted at install
time.
tyler
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake