ENH: Fix test for cpack variables, add support for icon on windows

This commit is contained in:
Andy Cedilnik 2006-01-09 11:26:31 -05:00
parent e8b7d233d7
commit 0c302a7e5f
4 changed files with 17 additions and 2 deletions

View File

@ -187,6 +187,9 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
IF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\CMakeInstall.bmp")
ENDIF(WIN32 AND NOT UNIX)
INCLUDE(CPack)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")

View File

@ -6,9 +6,9 @@ ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
# Macro for setting values if a user did not overwrite them
MACRO(cpack_set_if_not_set name value)
IF(NOT "${name}")
IF(NOT DEFINED "${name}")
SET(${name} "${value}")
ENDIF(NOT "${name}")
ENDIF(NOT DEFINED "${name}")
ENDMACRO(cpack_set_if_not_set)
# Set the package name

View File

@ -222,6 +222,11 @@ int cmCPackGenericGenerator::ProcessGenerator()
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Compress package" << std::endl);
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress files to: " << tempPackageFileName << std::endl);
if ( cmSystemTools::FileExists(tempPackageFileName) )
{
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove old package file" << std::endl);
cmSystemTools::RemoveFile(tempPackageFileName);
}
if ( !this->CompressFiles(tempPackageFileName,
tempDirectory, gl.GetFiles()) )
{

View File

@ -1,10 +1,17 @@
SET(CPACK_GENERATOR "@CPACK_GENERATOR@")
SET(CPACK_PACKAGE_NAME "@CPACK_PACKAGE_NAME@")
SET(CPACK_PACKAGE_VERSION_MAJOR "@CPACK_PACKAGE_VERSION_MAJOR@")
SET(CPACK_PACKAGE_VERSION_MINOR "@CPACK_PACKAGE_VERSION_MINOR@")
SET(CPACK_PACKAGE_VERSION_PATCH "@CPACK_PACKAGE_VERSION_PATCH@")
SET(CPACK_PACKAGE_VENDOR "@CPACK_PACKAGE_VENDOR@")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "@CPACK_PACKAGE_DESCRIPTION_FILE@")
SET(CPACK_SOURCE_DIR "@CPACK_SOURCE_DIR@")
SET(CPACK_BINARY_DIR "@CPACK_BINARY_DIR@")
SET(CPACK_PACKAGE_ICON "@CPACK_PACKAGE_ICON@")