ENH: Attempt to handle windows without NSIS installed

This commit is contained in:
Andy Cedilnik 2006-02-28 13:30:11 -05:00
parent b1443931b0
commit 3341923ecb
2 changed files with 20 additions and 0 deletions

View File

@ -125,6 +125,16 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Test of packaging with cpack")
SET(CPACK_PACKAGE_VENDOR "Kitware")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/foo.h")
IF(WIN32 AND NOT UNIX)
FIND_PROGRAM(NSIS_MAKENSIS NAMES makensis
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS]
DOC "Where is makensis.exe located"
)
IF(NOT NSIS_MAKENSIS)
SET(CPACK_GENERATOR TGZ)
ENDIF(NOT NSIS_MAKENSIS)
ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
INCLUDE(CPack)

View File

@ -125,6 +125,16 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Test of packaging with cpack")
SET(CPACK_PACKAGE_VENDOR "Kitware")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/foo.h")
IF(WIN32 AND NOT UNIX)
FIND_PROGRAM(NSIS_MAKENSIS NAMES makensis
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS]
DOC "Where is makensis.exe located"
)
IF(NOT NSIS_MAKENSIS)
SET(CPACK_GENERATOR TGZ)
ENDIF(NOT NSIS_MAKENSIS)
ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
INCLUDE(CPack)