<div>Problem: Cannot change name of installer package.</div>
<div>Cmake version: 2.8.4<br><br>I am trying to change the value of CPACK_PACKAGE_NAME depending upon which build was performed. What I am seeing is that CPACK_PACKAGE_NAME is always set to the project name. The code I am using to try and change the name is below. How can I change the CPACK_PACKAGE_NAME value depending upon if I send Debug or Release as an option to cpack (e.g. cpack -C Debug)?<br>
<br>IF(CMAKE_BUILD_TYPE MATCHES Release)<br> SET(CPACK_PACKAGE_NAME ${PROJECT_NAME} )<br> MESSAGE(STATUS "Project name: " ${CPACK_PACKAGE_NAME} )<br>ELSEIF(CMAKE_BUILD_TYPE MATCHES Debug)<br> SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}_debug")<br>
MESSAGE(STATUS "Project name: " ${CPACK_PACKAGE_NAME} )<br>ENDIF(CMAKE_BUILD_TYPE MATCHES Release)</div>
<div> </div>
<div>Stephen<br></div>