package.cmake.in 2.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# Per-generator CPack configuration file. See CPACK_PROJECT_CONFIG_FILE documented at
# http://www.cmake.org/cmake/help/v2.8.12/cpack.html#variable:CPACK_PROJECT_CONFIG_FILE
#
# All common CPACK_* variables are set in CMakeLists.txt already. This file only
# overrides some of these to provide package generator specific settings.

# whether package contains all development files or only runtime files
set (DEVEL @INSTALL_HEADERS@)

# ------------------------------------------------------------------------------
# Mac OS X package
if (CPACK_GENERATOR MATCHES "PackageMaker|DragNDrop")

  set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
  if (DEVEL)
    set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
  endif ()
  set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}")

# ------------------------------------------------------------------------------
# Debian package
22
elseif (CPACK_GENERATOR MATCHES "DEB")
23 24 25 26 27 28 29

  set (CPACK_PACKAGE_FILE_NAME   "lib${CPACK_PACKAGE_NAME}")
  if (DEVEL)
    set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-dev")
  else ()
    set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}0")
  endif ()
30
  set (CPACK_PACKAGE_FILE_NAME   "${CPACK_PACKAGE_FILE_NAME}_${CPACK_PACKAGE_VERSION}-1_${CPACK_PACKAGE_ARCHITECTURE}")
31

32
  set (CPACK_DEBIAN_PACKAGE_DEPENDS)
33 34 35 36 37
  set (CPACK_DEBIAN_PACKAGE_SECTION      "devel")
  set (CPACK_DEBIAN_PACKAGE_PRIORITY     "optional")
  set (CPACK_DEBIAN_PACKAGE_HOMEPAGE     "${CPACK_RPM_PACKAGE_URL}")
  set (CPACK_DEBIAN_PACKAGE_MAINTAINER   "${CPACK_PACKAGE_VENDOR}")
  set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${CPACK_PACKAGE_ARCHITECTURE}")
38 39 40

# ------------------------------------------------------------------------------
# RPM package
41
elseif (CPACK_GENERATOR MATCHES "RPM")
42 43 44 45 46

  set (CPACK_PACKAGE_FILE_NAME   "${CPACK_PACKAGE_NAME}")
  if (DEVEL)
    set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-devel")
  endif ()
47
  set (CPACK_PACKAGE_FILE_NAME   "${CPACK_PACKAGE_FILE_NAME}-${CPACK_PACKAGE_VERSION}-1.${CPACK_PACKAGE_ARCHITECTURE}")
48 49

endif ()