2 # First, set the generator variable 4 if(NOT CPACK_GENERATOR)
6 find_program(NSIS_MAKENSIS NAMES makensis
7 PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS]
8 DOC
"Where is makensis.exe located" 12 set(CPACK_GENERATOR ZIP)
14 set(CPACK_GENERATOR
"NSIS;ZIP")
16 endif(NOT NSIS_MAKENSIS)
19 set(CPACK_GENERATOR DragNDrop)
21 set(CPACK_GENERATOR TGZ)
24 endif(NOT CPACK_GENERATOR)
26 # Set Redistributable information for windows 27 if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
30 set(CPACK_VISUAL_STUDIO_VERSION_MAJOR "${VISUAL_STUDIO_VERSION_MAJOR}
") 31 set(CPACK_VISUAL_STUDIO_PRODUCT_NAME "${VISUAL_STUDIO_PRODUCT_NAME}
") 32 set(CPACK_LIBRARY_ARCHITECTURE "${CMAKE_LIBRARY_ARCHITECTURE}
") 34 # Visual Studio 2017 already comes with redistributable installers. 35 # Try to find the right one. 37 set(vswhere "$ENV{PROGRAMFILES\(X86\)}\\Microsoft Visual Studio\\Installer\\vswhere.exe
") 40 execute_process(COMMAND ${vswhere} -latest -property installationPath 41 OUTPUT_VARIABLE installationPath 42 OUTPUT_STRIP_TRAILING_WHITESPACE) 43 file(TO_CMAKE_PATH "${installationPath}
" installationPath) 44 set(redistPath "${installationPath}/VC/Redist/MSVC
") 45 file(GLOB redistPath "${installationPath}/VC/Redist/MSVC
mitkFunctionGetMSVCVersion()