[CMake] BundleUtilities and multiple configurations with different executable post-fixes

Nils Gladitz nilsgladitz at gmail.com
Wed Mar 19 06:48:38 EDT 2014


On 19.03.2014 10:56, Geert Litjens wrote:
>
> Since this week I have been using BundleUtilities to automatically 
> copy third-party dependencies to the install directory. However, I 
> have one issue: when we make debug builds we use DEBUG_POSTFIX to 
> append _d to our executables and libraries (so we can package both). 
> However, as far as I know, because there is no CONFIGURATION signature 
> for the INSTALL(CODE... command, it is not possible to specify 
> different fixup_bundle commands for different configurations in Visual 
> Studio. If anyone has any suggestions, that would be great.
>

Take a look at the generated cmake_install.cmake in your build directory.

Configuration specific target installations generate code that uses e.g.:
     IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")

You should be able to use the same or similar patterns with install(CODE).

Nils


More information about the CMake mailing list