Using the single command will place the release libraries into the lib/release directory when using the -C Release flag with CPack. If I do -C Debug flag with CPack then the PDB files are installed to lib/debug but the libraries are installed to lib/release. Any reason why this single command would behave that way?
Stephen On 11/18/11, Michael Wild <[email protected]> wrote: > On 11/17/2011 06:12 PM, Stephen Torri wrote: >> 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 > > I think you mis-read the install() documentation. Granted, it is a bit > confusing and matching up the brackets is a bit tedious, but the > CONFIGURATIONS option applies only to the preceeding DESTINATION option. > So you could write everything in one single command: > > install(TARGETS first > ARCHIVE DESTINATION lib/debug CONFIGURATIONS Debug > LIBRARY DESTINATION lib/debug CONFIGURATIONS Debug > RUNTIME DESTINATION lib/debug CONFIGURATIONS Debug > ARCHIVE DESTINATION lib/release CONFIGURATIONS Release > LIBRARY DESTINATION lib/release CONFIGURATIONS Release > RUNTIME DESTINATION lib/release CONFIGURATIONS Release) > > HTH > > Michael > -- > > 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 > -- 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
