Diff of /CMakeLists.txt [cfcb99] .. [ad6167] Maximize Restore

  Switch to side-by-side view

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -390,6 +390,29 @@
     # install into place in build-dir
     SET( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/INSTALL/FILES CACHE FILEPATH "install prefix" FORCE)
     INCLUDE (win_bundle)
+	
+	#Build HuginSetup
+	OPTION (BUILD_HUGINSETUP "Build HuginSetup (NSIS Installer)" OFF)
+    IF(BUILD_HUGINSETUP)
+      FIND_PACKAGE(7ZIP REQUIRED)
+      IF(7ZIP_FOUND)
+        MESSAGE(STATUS "7ZIP found (${7ZA})")
+      ELSE(7ZIP_FOUND)
+        MESSAGE(STATUS "7ZIP not found")
+      ENDIF(7ZIP_FOUND)
+      FIND_PACKAGE(NSIS REQUIRED)
+      IF(NSIS_FOUND)
+        MESSAGE(STATUS "NSIS found (${MAKENSIS_EXECUTABLE})")
+      ELSE(NSIS_FOUND)
+        MESSAGE(STATUS "NSIS not found")
+      ENDIF(NSIS_FOUND)
+      IF(CMAKE_SIZEOF_VOID_P EQUAL 4) #32bit
+        ADD_CUSTOM_TARGET(HuginSetup COMMAND ${7ZA} a hugin_bin32 FILES/bin COMMAND ${7ZA} a hugin_share32 FILES/share COMMAND ${7ZA} a hugin_doc FILES/doc COMMAND ${MAKENSIS_EXECUTABLE} HuginSetup.nsi WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/../)
+      ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      IF(CMAKE_SIZEOF_VOID_P EQUAL 8) #64bit
+        ADD_CUSTOM_TARGET(HuginSetup COMMAND ${7ZA} a hugin_bin64 FILES/bin COMMAND ${7ZA} a hugin_share64 FILES/share COMMAND ${7ZA} a hugin_doc FILES/doc COMMAND ${MAKENSIS_EXECUTABLE} HuginSetup.nsi WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/../)
+      ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+    ENDIF(BUILD_HUGINSETUP)
   ENDIF(WIN32)
 
   IF (MSVC)