CMakeCPack.cmake 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. INCLUDE(InstallRequiredSystemLibraries)
  2. IF (WIN32)
  3. SET(CPACK_GENERATOR "NSIS")
  4. SET(CPACK_SOURCE_GENERATOR "ZIP")
  5. ENDIF (WIN32)
  6. IF (UNIX)
  7. SET(CPACK_GENERATOR "TGZ;DEB;RPM")
  8. SET(CPACK_SOURCE_GENERATOR "ZIP;TGZ;TBZ2")
  9. ENDIF (UNIX)
  10. IF (APPLE)
  11. SET(CPACK_GENERATOR "OSXX11")
  12. ENDIF (APPLE)
  13. SET(CPACK_STRIP_FILES "1")
  14. SET(CPACK_PACKAGE_NAME "VLE")
  15. SET(CPACK_PACKAGE_VENDOR "VLE Development Team")
  16. SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "VLE - Virtual Laboratory Environment")
  17. SET(CPACK_PACKAGE_CONTACT "Gauthier Quesnel <quesnel@users.sourceforge.net>")
  18. SET(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README")
  19. SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
  20. SET(CPACK_PACKAGE_FILE_NAME "${VLE_NAME_COMPLETE}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
  21. SET(CPACK_PACKAGE_VERSION_MAJOR "${VLE_MAJOR}")
  22. SET(CPACK_PACKAGE_VERSION_MINOR "${VLE_MINOR}")
  23. IF ("${VLE_EXTRA}" STREQUAL "")
  24. SET(CPACK_PACKAGE_VERSION_PATCH "${VLE_PATCH}")
  25. ELSE ("${VLE_EXTRA}" STREQUAL "")
  26. SET(CPACK_PACKAGE_VERSION_PATCH "${VLE_PATCH}-${VLE_EXTRA}")
  27. ENDIF ("${VLE_EXTRA}" STREQUAL "")
  28. SET(CPACK_PACKAGE_INSTALL_DIRECTORY ${VLE_NAME_COMPLETE})
  29. SET(CPACK_PACKAGE_EXECUTABLES "vle" "VLE" "oov" "OOV" "eov" "EOV" "gvle" "GVLE")
  30. # CPack source configuration
  31. SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${VLE_NAME_COMPLETE})
  32. SET(CPACK_SOURCE_IGNORE_FILES "\\\\.swp$;/\\\\.gitignore;/build/;/\\\\.git/")
  33. # CPack DEB configuration
  34. SET(CPACK_DEBIAN_PACKAGE_NAME ${VLE_NAME}-${VLE_MAJOR}.${VLE_MINOR})
  35. SET(CPACK_DEBIAN_PACKAGE_VERSION ${VLE_COMPLETE})
  36. SET(CPACK_DEBIAN_PACKAGE_DEPENDS "")
  37. SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS "")
  38. SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Gauthier Quesnel <quesnel@users.sourceforge.net>")
  39. SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "VLE, a framework for multi-modeling, simulation and analysis of complex dynamical systems.")
  40. SET(CPACK_DEBIAN_PACKAGE_SECTION "libs")
  41. SET(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
  42. # CPack RPM configuration
  43. SET(CPACK_RPM_PACKAGE_SUMMARY "VLE, a framework for multi-modeling, simulation and analysis of complex dynamical systems.")
  44. SET(CPACK_RPM_PACKAGE_NAME ${VLE_NAME}-${VLE_MAJOR}.${VLE_MINOR})
  45. SET(CPACK_RPM_PACKAGE_VERSION ${VLE_MAJOR}.${VLE_MINOR}.${VLE_PATCH})
  46. SET(CPACK_RPM_PACKAGE_RELEASE "1")
  47. SET(CPACK_RPM_PACKAGE_VENDOR "Gauthier Quesnel <quesnel@users.sourceforge.net>")
  48. SET(CPACK_RPM_PACKAGE_LICENSE "GNU General Public License (GPL)")
  49. SET(CPACK_RPM_PACKAGE_DESCRIPTION "VLE, a framework for multi-modeling, simulation and analysis of complex dynamical systems.")
  50. # CPack NSIS configuration
  51. IF (CPACK_GENERATOR MATCHES "NSIS")
  52. SET(CMAKE_MODULE_PATH "share")
  53. SET(VLE_BOOST_INCLUDE_DIR CACHE PATH "Boost include directory")
  54. SET(VLE_BOOST_LIBRARY_DIR CACHE PATH "Boost library directory")
  55. SET(VLE_MINGW_PATH CACHE PATH "Mingw Boost directory")
  56. SET(VLE_GTK_PATH CACHE PATH "Gtk directory")
  57. SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/share)
  58. INSTALL(DIRECTORY "${VLE_BOOST_INCLUDE_DIR}/" DESTINATION include)
  59. INSTALL(DIRECTORY "${VLE_BOOST_LIBRARY_DIR}/" DESTINATION bin
  60. FILES_MATCHING PATTERN "libboost*.dll")
  61. INSTALL(DIRECTORY "${VLE_BOOST_LIBRARY_DIR}/" DESTINATION lib
  62. FILES_MATCHING PATTERN "libboost*.a")
  63. INSTALL(FILES "${VLE_MINGW_PATH}/bin\\\\mingwm10.dll" DESTINATION bin)
  64. INSTALL(DIRECTORY "${VLE_GTK_PATH}/include/" DESTINATION include)
  65. INSTALL(DIRECTORY "${VLE_GTK_PATH}/redist/" DESTINATION bin)
  66. INSTALL(FILES "${VLE_GTK_PATH}/bin\\\\pkg-config.exe" DESTINATION bin)
  67. INSTALL(DIRECTORY "${VLE_GTK_PATH}/lib/" DESTINATION lib
  68. PATTERN "*.def" EXCLUDE
  69. PATTERN "*.lib" EXCLUDE)
  70. INSTALL(DIRECTORY "${VLE_GTK_PATH}/etc\\\\gtk-2.0" DESTINATION etc)
  71. INSTALL(DIRECTORY "${VLE_GTK_PATH}/etc\\\\pango" DESTINATION etc)
  72. INSTALL(DIRECTORY "${VLE_GTK_PATH}/share\\\\doc" DESTINATION share)
  73. INSTALL(DIRECTORY "${VLE_GTK_PATH}/share\\\\locale" DESTINATION share)
  74. INSTALL(DIRECTORY "${VLE_GTK_PATH}/share\\\\themes" DESTINATION share)
  75. SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/share/pixmaps\\\\vle.ico")
  76. SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/share/pixmaps\\\\vle.ico")
  77. SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/share/pixmaps\\\\logo.bmp")
  78. SET(CPACK_NSIS_MENU_LINKS "${VLE_SHARE_DIRS}/doc/vle.chm" "VLE API" "http://www.sourceforge.net/projects/vle" "VLE Web Site")
  79. SET(CPACK_CREATE_DESKTOP_LINKS gvle)
  80. SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\vle.exe")
  81. SET(CPACK_NSIS_DISPLAY_NAME "VLE - Virtual Laboratory Environment")
  82. SET(CPACK_NSIS_HELP_LINK "http://www.sourceforge.net/projects/vle")
  83. SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.sourceforge.net/projects/vle")
  84. SET(CPACK_NSIS_CONTACT "Gauthier Quesnel <quesnel@users.sourceforge.net>")
  85. SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${VLE_VERSION_SHORT}.0")
  86. SET(CPACK_NSIS_MODIFY_PATH ON)
  87. ENDIF (CPACK_GENERATOR MATCHES "NSIS")
  88. INCLUDE(CPack)
  89. # vim:tw=0:ts=8:tw=0:sw=2:sts=2