A few more ideas:
The other "no need to modify CMake" way to achieve this (although it may be considered "too ugly" or non-ideal by some) would be to force the use of a single configuration per build tree, and use the proper value for CMAKE_INSTALL_PREFIX in each build tree. Your developers may not like that, but it would sure make the problem at hand disappear. The other thing to consider is that the file cmake_install.cmake, generated at the top of your build tree contains code like the following: # Set the install prefix if(NOT DEFINED CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/Tutorial") endif() In the end, installing your project is ultimately a call of some sort to "cmake -P cmake_install.cmake" -- you could simply install your project with a custom call to that script which passes in the proper value for CMAKE_INSTALL_PREFIX using -D... The above generated code allows you to override it by passing it in when the script is called. The Visual Studio command for the INSTALL project looks like this: "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -P cmake_install.cmake You could easily write a custom target / custom command that is an alternate "configuration-prefixed" install as: "C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=$(Configuration) -DCMAKE_INSTALL_PREFIX=config-specific-value-here -P cmake_install.cmake HTH, David C. On Mon, Jul 13, 2015 at 12:29 PM, Clifford Yapp <cliffy...@gmail.com> wrote: > On Mon, Jul 13, 2015 at 12:05 PM, David Cole <dlrd...@aol.com> wrote: >> I think this should be achievable somehow with CMAKE_INSTALL_PREFIX >> set to "/parent_dirs" and then using appropriate DESTINATION and >> CONFIGURATIONS arguments to the CMake install commands. >> >> Have you tried using the CONFIGURATIONS args to the install command? > > We haven't tried altering the install commands, but there's a > difficulty there - we don't always control all the CMake code in our > build. We include some 3rd party libraries and try to keep their code > as close to "vanilla" as possible, which means it would be vastly > preferable not to need to track down and redo all the install commands > in that code whenever we needed to re-sync. > > Thanks, > CY -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake