From 3341923ecb02a21e8182a59a82bb016c9b992c92 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 28 Feb 2006 13:30:11 -0500 Subject: [PATCH] ENH: Attempt to handle windows without NSIS installed --- Tests/SimpleInstall/CMakeLists.txt | 10 ++++++++++ Tests/SimpleInstallS2/CMakeLists.txt | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index b4787c82b..a228a159f 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -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) diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index b4787c82b..a228a159f 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -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)