• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# If the cmake version includes cpack, use it
2IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
3  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
4  SET(CPACK_PACKAGE_VENDOR "${PROJECT_VENDOR}")
5  SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
6  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
7  SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
8  SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
9  SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
10#  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${PROJECT_VERSION}")
11  SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_FULL}")
12
13  IF(NOT DEFINED CPACK_SYSTEM_NAME)
14    SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
15  ENDIF(NOT DEFINED CPACK_SYSTEM_NAME)
16
17  IF(${CPACK_SYSTEM_NAME} MATCHES Windows)
18    IF(CMAKE_CL_64)
19      SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR})
20    ELSE(CMAKE_CL_64)
21      SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR})
22    ENDIF(CMAKE_CL_64)
23  ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows)
24
25  IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
26    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
27  ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
28
29  SET(CPACK_PACKAGE_CONTACT "${PROJECT_CONTACT}")
30  IF(UNIX)
31    SET(CPACK_STRIP_FILES "")
32    SET(CPACK_SOURCE_STRIP_FILES "")
33#    SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
34  ENDIF(UNIX)
35  SET(CPACK_SOURCE_IGNORE_FILES "/CVS/" "/build/" "/\\\\.build/" "/\\\\.svn/" "~$")
36  # include CPack model once all variables are set
37  INCLUDE(CPack)
38ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
39