Hi all, I'm trying to make it so that Release configuration library is
installed in lib/Release, and debug configuration library is installed in
lib/Debug.

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}:

    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)"...

Is there a way to use the configuration name passed to cmake in the install
step (e.g. I've found out that in Visual Studio the install step invoke
"cmake.exe -DBUILD_TYPE=$(OutDir) -P cmake_install.cmake")?

Alternatively, is it possible to delay variable expansion until the
cmake_install.cmake script is invoked?

What I want to do it simple compiles and install all configurations using a
single batch build...

Baptiste.
_______________________________________________
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

Reply via email to