[CMake] Install command incorrectly installing archive libraries

Stephen Torri stephen.torri at gmail.com
Thu Nov 17 12:12:04 EST 2011


CMake Version: 2.8

Generator: Visual Studio 2008

Problem: Two install commands are used per library. First command
should only install libraries to lib/debug when the build type is
Debug. The second command should only install libraries to the
lib/release directory. When the build type is Debug than three
libraries .lib files are being installed to the lib\release directory.

For example I have the following entries for a library:

INSTALL ( TARGETS first
    ARCHIVE DESTINATION lib/debug
    LIBRARY DESTINATION lib/debug
    RUNTIME DESTINATION lib/debug
    CONFIGURATIONS Debug )

INSTALL ( TARGETS first
    ARCHIVE DESTINATION lib/release
    LIBRARY DESTINATION lib/release
    RUNTIME DESTINATION lib/release
    CONFIGURATIONS Release )

So when I run cpack -C Debug and use the installer I find first.lib in
both lib/debug and lib/release. I am not sure why this is the case.
Any ideas?

Stephen


More information about the CMake mailing list