cmb.bundle.common.cmake 1.63 KB
Newer Older
1 2
# Consolidates platform independent stub for cmb.bundle.cmake files.

3
include (cmb_version)
4
include (paraview_version)
5 6 7

# Enable CPack packaging.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
8 9
  "CMB Suite of Tools.")
set(CPACK_PACKAGE_NAME "CMB")
10
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
11 12
set(CPACK_RESOURCE_FILE_LICENSE
    "${CMBSuperBuild_SOURCE_DIR}/License.txt")
13 14 15 16
set(CPACK_PACKAGE_VERSION_MAJOR ${cmb_version_major})
set(CPACK_PACKAGE_VERSION_MINOR ${cmb_version_minor})
if (cmb_version_suffix)
  set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch}-${cmb_version_suffix})
17
else()
18
  set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch})
19 20
endif()

21
SET(CPACK_PACKAGE_INSTALL_DIRECTORY
22 23
  "CMBSuite ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
24
  "CMBSuite-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
25 26 27 28 29 30

if(NOT DEFINED CPACK_SYSTEM_NAME)
  set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
endif()
if(${CPACK_SYSTEM_NAME} MATCHES Windows)
  if(CMAKE_CL_64)
31
    set(CPACK_SYSTEM_NAME win64)
32
  else(CMAKE_CL_64)
33
    set(CPACK_SYSTEM_NAME win32)
34 35 36 37 38 39
  endif()
endif()
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
  set(CPACK_PACKAGE_FILE_NAME
    "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
endif()
40

41
#set the programs we want to install
42
set(cmb_programs_to_install
43 44 45
    ModelBuilder
    paraview
    )
46 47 48 49 50


#sort the list so the package order is reasonable and deducible to the user
list(SORT cmb_programs_to_install)

51 52
# Don't import CPack yet, let the platform specific code get another chance at
# changing the variables.