diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-01-09 16:26:31 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-01-09 16:26:31 (GMT) |
commit | 0c302a7e5fa1b52b6b59a0f299dd811a9a1194c7 (patch) | |
tree | d04d85e0e4ae1de2bcb0c802567910ebb944c60f | |
parent | e8b7d233d7545e59fb0046913048d0bcc097ac33 (diff) | |
download | CMake-0c302a7e5fa1b52b6b59a0f299dd811a9a1194c7.zip CMake-0c302a7e5fa1b52b6b59a0f299dd811a9a1194c7.tar.gz CMake-0c302a7e5fa1b52b6b59a0f299dd811a9a1194c7.tar.bz2 |
ENH: Fix test for cpack variables, add support for icon on windows
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | Modules/CPack.cmake | 4 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenericGenerator.cxx | 5 | ||||
-rw-r--r-- | Templates/CPackConfig.cmake.in | 7 |
4 files changed, 17 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f057887..8600c55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index 39c773c..8c32e20 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -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 diff --git a/Source/CPack/cmCPackGenericGenerator.cxx b/Source/CPack/cmCPackGenericGenerator.cxx index 7f77178..6da855e 100644 --- a/Source/CPack/cmCPackGenericGenerator.cxx +++ b/Source/CPack/cmCPackGenericGenerator.cxx @@ -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()) ) { diff --git a/Templates/CPackConfig.cmake.in b/Templates/CPackConfig.cmake.in index efc35cb..411089a 100644 --- a/Templates/CPackConfig.cmake.in +++ b/Templates/CPackConfig.cmake.in @@ -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@") |