summaryrefslogtreecommitdiffstats
path: root/CPackConfig.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CPackConfig.cmake')
-rw-r--r--CPackConfig.cmake26
1 files changed, 15 insertions, 11 deletions
diff --git a/CPackConfig.cmake b/CPackConfig.cmake
index bb53a7c7..72f86d78 100644
--- a/CPackConfig.cmake
+++ b/CPackConfig.cmake
@@ -22,17 +22,21 @@ set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;tags;cscope.*")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
-
-### nsis generator
-set(CPACK_GENERATOR "ZIP")
-
-find_package(NSIS)
-if (HAVE_NSIS)
- set(CPACK_GENERATOR "${CPACK_GENERATOR};NSIS")
- set(CPACK_NSIS_DISPLAY_NAME "The SSH Library")
- set(CPACK_NSIS_COMPRESSOR "/SOLID zlib")
- set(CPACK_NSIS_MENU_LINKS "http://www.libssh.org/" "libssh homepage")
-endif (HAVE_NSIS)
+if (WIN32)
+ set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS TRUE)
+ include(InstallRequiredSystemLibraries)
+
+ set(CPACK_GENERATOR "ZIP")
+
+ ### nsis generator
+ find_package(NSIS)
+ if (HAVE_NSIS)
+ set(CPACK_GENERATOR "${CPACK_GENERATOR};NSIS")
+ set(CPACK_NSIS_DISPLAY_NAME "The SSH Library")
+ set(CPACK_NSIS_COMPRESSOR "/SOLID zlib")
+ set(CPACK_NSIS_MENU_LINKS "http://www.libssh.org/" "libssh homepage")
+ endif (HAVE_NSIS)
+endif (WIN32)
set(CPACK_PACKAGE_INSTALL_DIRECTORY "libssh")