[CMake] Install problem

Surya Kiran Gullapalli suryakiran.gullapalli at gmail.com
Tue Apr 15 20:59:03 EDT 2008


On Tue, Apr 15, 2008 at 7:07 PM, Surya Kiran Gullapalli <
suryakiran.gullapalli at gmail.com> wrote:

> Hello all,
> I'm building a library in debug and in release modes. I want the built
> library to go at different locations for each configuration. So I've done
> something like this.
>
> ===============================
> set (mytarget "mylib")
> Add_Library (${mytarget} ${mysrcs})
>
> Set_Target_Properties (${mytarget} PROPERTIES DEBUG_POSTFIX d)
>
> INSTALL (
> TARGETS ${mytarget}
> RUNTIME DESTINATION bin_debug
> LIBRARY DESTINATION lib_debug
> CONFIGURATIONS Debug
> )
>
> INSTALL (
> TARGETS ${mytarget}
> RUNTIME DESTINATION bin
> LIBRARY DESTINATION lib
> CONFIGURATIONS Release
> )
> ==================================
>
> Both the debug and release libraries are built properly. But the problem
> is the library is getting installed to both the directories for both the
> configurations.
>
> That means the ${CMAKE_INSTALL_DIR}/bin contains mylibd.dll and mylib.dll
> and same is the case for ${CMAKE_INSTALL_DIR}/bin_debug.
>
>
> What i want ideally is the mylibd.dll should go to bin_debug directory and
> mylib.dll should go to bin directory.
>
>
> I'm using cmake -2.4.8 on windows XP and Using MSVC 8.0 solution file
> generator.
>
> Thanks in advance,
> Surya
>

As far as i understand, if you specify configurations in INSTALL command,
that particular command will be exectuted in that particular configuration
only.

Then why is that release configuration command is getting executed in debug
configuration and vice versa ?

Surya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080416/0e0f9166/attachment.htm>


More information about the CMake mailing list