ENH: Fix test for cpack variables, add support for icon on windows
This commit is contained in:
parent
e8b7d233d7
commit
0c302a7e5f
|
@ -187,6 +187,9 @@ IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}")
|
SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}")
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}")
|
SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}")
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}")
|
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)
|
INCLUDE(CPack)
|
||||||
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
ENDIF(EXISTS "${CMAKE_ROOT}/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 for setting values if a user did not overwrite them
|
||||||
MACRO(cpack_set_if_not_set name value)
|
MACRO(cpack_set_if_not_set name value)
|
||||||
IF(NOT "${name}")
|
IF(NOT DEFINED "${name}")
|
||||||
SET(${name} "${value}")
|
SET(${name} "${value}")
|
||||||
ENDIF(NOT "${name}")
|
ENDIF(NOT DEFINED "${name}")
|
||||||
ENDMACRO(cpack_set_if_not_set)
|
ENDMACRO(cpack_set_if_not_set)
|
||||||
|
|
||||||
# Set the package name
|
# Set the package name
|
||||||
|
|
|
@ -222,6 +222,11 @@ int cmCPackGenericGenerator::ProcessGenerator()
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Compress package" << std::endl);
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Compress package" << std::endl);
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress files to: " << tempPackageFileName << 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,
|
if ( !this->CompressFiles(tempPackageFileName,
|
||||||
tempDirectory, gl.GetFiles()) )
|
tempDirectory, gl.GetFiles()) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,17 @@
|
||||||
SET(CPACK_GENERATOR "@CPACK_GENERATOR@")
|
SET(CPACK_GENERATOR "@CPACK_GENERATOR@")
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_NAME "@CPACK_PACKAGE_NAME@")
|
SET(CPACK_PACKAGE_NAME "@CPACK_PACKAGE_NAME@")
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_VERSION_MAJOR "@CPACK_PACKAGE_VERSION_MAJOR@")
|
SET(CPACK_PACKAGE_VERSION_MAJOR "@CPACK_PACKAGE_VERSION_MAJOR@")
|
||||||
SET(CPACK_PACKAGE_VERSION_MINOR "@CPACK_PACKAGE_VERSION_MINOR@")
|
SET(CPACK_PACKAGE_VERSION_MINOR "@CPACK_PACKAGE_VERSION_MINOR@")
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH "@CPACK_PACKAGE_VERSION_PATCH@")
|
SET(CPACK_PACKAGE_VERSION_PATCH "@CPACK_PACKAGE_VERSION_PATCH@")
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_VENDOR "@CPACK_PACKAGE_VENDOR@")
|
SET(CPACK_PACKAGE_VENDOR "@CPACK_PACKAGE_VENDOR@")
|
||||||
|
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@CPACK_PACKAGE_DESCRIPTION_SUMMARY@")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "@CPACK_PACKAGE_DESCRIPTION_FILE@")
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "@CPACK_PACKAGE_DESCRIPTION_FILE@")
|
||||||
|
|
||||||
SET(CPACK_SOURCE_DIR "@CPACK_SOURCE_DIR@")
|
SET(CPACK_SOURCE_DIR "@CPACK_SOURCE_DIR@")
|
||||||
SET(CPACK_BINARY_DIR "@CPACK_BINARY_DIR@")
|
SET(CPACK_BINARY_DIR "@CPACK_BINARY_DIR@")
|
||||||
|
|
||||||
|
SET(CPACK_PACKAGE_ICON "@CPACK_PACKAGE_ICON@")
|
||||||
|
|
Loading…
Reference in New Issue