[CMake] CPack: How to add the Build Configuration Type to the created installer

Eric Noulard eric.noulard at gmail.com
Thu Nov 5 15:55:56 EST 2009


2009/11/5 Michael Jackson <mike.jackson at bluequartz.net>:
> I would like to generate installers for both a Release and a Debug build but
> have them be separate installers under Visual Studio. Currently when I build
> the "PACKAGE" project in my solution I get a nice installer with a name
> like:
>
> AIMRepresentation-2009.11.03-win64.exe which is generally fine but I was
> trying to figure out how to add -Debuge.exe at the end of the generated
> filename. I am sure it is probably some simple cpack variable but I am
> failing to find what I need.

Did you try setting up
CPACK_PACKAGE_FILE_NAME

If this variable is not set [before you INCLUDE(CPack)]
then is set to:
${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}

see: http://www.cmake.org/Wiki/CMake:CPackConfiguration
In order to get a may-be-complete list of CPack variables you may try:
cmake --help-module CPack

However I don't know if all CPack generator do honor the CPACK_PACKAGE_FILE_NAME
usage.
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list