2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# CPack
|
|
|
|
# -----
|
|
|
|
#
|
|
|
|
# Build binary and source package installers.
|
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Variables common to all CPack generators
|
|
|
|
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
#
|
|
|
|
# The
|
2013-10-15 19:17:36 +04:00
|
|
|
# CPack module generates binary and source installers in a variety of
|
|
|
|
# formats using the cpack program. Inclusion of the CPack module adds
|
|
|
|
# two new targets to the resulting makefiles, package and
|
2008-07-08 19:52:25 +04:00
|
|
|
# package_source, which build the binary and source installers,
|
2013-10-15 19:17:36 +04:00
|
|
|
# respectively. The generated binary installers contain everything
|
2008-07-08 19:52:25 +04:00
|
|
|
# installed via CMake's INSTALL command (and the deprecated
|
|
|
|
# INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands).
|
|
|
|
#
|
|
|
|
# For certain kinds of binary installers (including the graphical
|
|
|
|
# installers on Mac OS X and Windows), CPack generates installers that
|
2013-10-15 19:17:36 +04:00
|
|
|
# allow users to select individual application components to install.
|
|
|
|
# See CPackComponent module for that.
|
2008-07-08 19:52:25 +04:00
|
|
|
#
|
2010-08-11 19:40:11 +04:00
|
|
|
# The CPACK_GENERATOR variable has different meanings in different
|
2013-10-15 19:17:36 +04:00
|
|
|
# contexts. In your CMakeLists.txt file, CPACK_GENERATOR is a *list of
|
|
|
|
# generators*: when run with no other arguments, CPack will iterate over
|
|
|
|
# that list and produce one package for each generator. In a
|
|
|
|
# CPACK_PROJECT_CONFIG_FILE, though, CPACK_GENERATOR is a *string naming
|
|
|
|
# a single generator*. If you need per-cpack- generator logic to
|
|
|
|
# control *other* cpack settings, then you need a
|
|
|
|
# CPACK_PROJECT_CONFIG_FILE.
|
2010-08-11 19:40:11 +04:00
|
|
|
#
|
|
|
|
# The CMake source tree itself contains a CPACK_PROJECT_CONFIG_FILE.
|
|
|
|
# See the top level file CMakeCPackOptions.cmake.in for an example.
|
|
|
|
#
|
2013-10-15 19:17:36 +04:00
|
|
|
# If set, the CPACK_PROJECT_CONFIG_FILE is included automatically on a
|
|
|
|
# per-generator basis. It only need contain overrides.
|
2010-08-11 19:40:11 +04:00
|
|
|
#
|
|
|
|
# Here's how it works:
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# * cpack runs
|
|
|
|
# * it includes CPackConfig.cmake
|
|
|
|
# * it iterates over the generators listed in that file's
|
|
|
|
# CPACK_GENERATOR list variable (unless told to use just a
|
|
|
|
# specific one via -G on the command line...)
|
|
|
|
# * foreach generator, it then
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# - sets CPACK_GENERATOR to the one currently being iterated
|
|
|
|
# - includes the CPACK_PROJECT_CONFIG_FILE
|
|
|
|
# - produces the package for that generator
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
|
|
|
# This is the key: For each generator listed in CPACK_GENERATOR in
|
|
|
|
# CPackConfig.cmake, cpack will *reset* CPACK_GENERATOR internally to
|
|
|
|
# *the one currently being used* and then include the
|
|
|
|
# CPACK_PROJECT_CONFIG_FILE.
|
|
|
|
#
|
|
|
|
# Before including this CPack module in your CMakeLists.txt file, there
|
|
|
|
# are a variety of variables that can be set to customize the resulting
|
2013-10-15 21:23:23 +04:00
|
|
|
# installers. The most commonly-used variables are:
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_NAME
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The name of the package (or application). If not specified, defaults to
|
|
|
|
# the project name.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_VENDOR
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The name of the package vendor. (e.g., "Kitware").
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_DIRECTORY
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The directory in which CPack is doing its packaging. If it is not set
|
|
|
|
# then this will default (internally) to the build dir. This variable may
|
|
|
|
# be defined in CPack config file or from the cpack command line option
|
|
|
|
# "-B". If set the command line option override the value found in the
|
|
|
|
# config file.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_VERSION_MAJOR
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Package major Version
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_VERSION_MINOR
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Package minor Version
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_VERSION_PATCH
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Package patch Version
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_DESCRIPTION_FILE
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# A text file used to describe the project. Used, for example, the
|
|
|
|
# introduction screen of a CPack-generated Windows installer to describe
|
|
|
|
# the project.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_DESCRIPTION_SUMMARY
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Short description of the project (only a few words).
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_FILE_NAME
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The name of the package file to generate, not including the
|
|
|
|
# extension. For example, cmake-2.6.1-Linux-i686. The default value is::
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
|
|
|
# ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
|
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_INSTALL_DIRECTORY
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Installation directory on the target system. This may be used by some
|
|
|
|
# CPack generators like NSIS to create an installation directory e.g.,
|
|
|
|
# "CMake 2.5" below the installation prefix. All installed element will be
|
|
|
|
# put inside this directory.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_ICON
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# A branding image that will be displayed inside the installer (used by GUI
|
|
|
|
# installers).
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PROJECT_CONFIG_FILE
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# CPack-time project CPack configuration file. This file included at cpack
|
|
|
|
# time, once per generator after CPack has set CPACK_GENERATOR to the
|
|
|
|
# actual generator being used. It allows per-generator setting of CPACK_*
|
|
|
|
# variables at cpack time.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_RESOURCE_FILE_LICENSE
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# License to be embedded in the installer. It will typically be displayed
|
|
|
|
# to the user by the produced installer (often with an explicit "Accept"
|
|
|
|
# button, for graphical installers) prior to installation. This license
|
|
|
|
# file is NOT added to installed file but is used by some CPack generators
|
|
|
|
# like NSIS. If you want to install a license file (may be the same as this
|
|
|
|
# one) along with your project you must add an appropriate CMake INSTALL
|
|
|
|
# command in your CMakeLists.txt.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_RESOURCE_FILE_README
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# ReadMe file to be embedded in the installer. It typically describes in
|
|
|
|
# some detail the purpose of the project during the installation. Not all
|
|
|
|
# CPack generators uses this file.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_RESOURCE_FILE_WELCOME
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Welcome file to be embedded in the installer. It welcomes users to this
|
|
|
|
# installer. Typically used in the graphical installers on Windows and Mac
|
|
|
|
# OS X.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_MONOLITHIC_INSTALL
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Disables the component-based installation mechanism. When set the
|
|
|
|
# component specification is ignored and all installed items are put in a
|
|
|
|
# single "MONOLITHIC" package. Some CPack generators do monolithic
|
|
|
|
# packaging by default and may be asked to do component packaging by
|
|
|
|
# setting CPACK_<GENNAME>_COMPONENT_INSTALL to 1/TRUE.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_GENERATOR
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# List of CPack generators to use. If not specified, CPack will create a
|
|
|
|
# set of options CPACK_BINARY_<GENNAME> (e.g., CPACK_BINARY_NSIS) allowing
|
|
|
|
# the user to enable/disable individual generators. This variable may be
|
|
|
|
# used on the command line as well as in::
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_OUTPUT_CONFIG_FILE
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The name of the CPack binary configuration file. This file is the CPack
|
|
|
|
# configuration generated by the CPack module for binary
|
|
|
|
# installers. Defaults to CPackConfig.cmake.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_EXECUTABLES
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Lists each of the executables and associated text label to be used to
|
|
|
|
# create Start Menu shortcuts. For example, setting this to the list
|
|
|
|
# ccmake;CMake will create a shortcut named "CMake" that will execute the
|
|
|
|
# installed executable ccmake. Not all CPack generators use it (at least
|
2014-02-04 21:40:45 +04:00
|
|
|
# NSIS, WIX and OSXX11 do).
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_STRIP_FILES
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# List of files to be stripped. Starting with CMake 2.6.0 CPACK_STRIP_FILES
|
|
|
|
# will be a boolean variable which enables stripping of all files (a list
|
|
|
|
# of files evaluates to TRUE in CMake, so this change is compatible).
|
2008-07-08 19:52:25 +04:00
|
|
|
#
|
2012-08-13 21:42:58 +04:00
|
|
|
# The following CPack variables are specific to source packages, and
|
2008-07-08 19:52:25 +04:00
|
|
|
# will not affect binary packages:
|
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_SOURCE_PACKAGE_FILE_NAME
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The name of the source package. For example cmake-2.6.1.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_SOURCE_STRIP_FILES
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# List of files in the source tree that will be stripped. Starting with
|
|
|
|
# CMake 2.6.0 CPACK_SOURCE_STRIP_FILES will be a boolean variable which
|
|
|
|
# enables stripping of all files (a list of files evaluates to TRUE in
|
|
|
|
# CMake, so this change is compatible).
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_SOURCE_GENERATOR
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# List of generators used for the source packages. As with CPACK_GENERATOR,
|
|
|
|
# if this is not specified then CPack will create a set of options (e.g.,
|
|
|
|
# CPACK_SOURCE_ZIP) allowing users to select which packages will be
|
|
|
|
# generated.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_SOURCE_OUTPUT_CONFIG_FILE
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# The name of the CPack source configuration file. This file is the CPack
|
|
|
|
# configuration generated by the CPack module for source
|
|
|
|
# installers. Defaults to CPackSourceConfig.cmake.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_SOURCE_IGNORE_FILES
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Pattern of files in the source tree that won't be packaged when building
|
|
|
|
# a source package. This is a list of regular expression patterns (that
|
|
|
|
# must be properly escaped), e.g.,
|
|
|
|
# /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
|
2008-07-08 19:52:25 +04:00
|
|
|
#
|
|
|
|
# The following variables are for advanced uses of CPack:
|
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_CMAKE_GENERATOR
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# What CMake generator should be used if the project is CMake
|
|
|
|
# project. Defaults to the value of CMAKE_GENERATOR few users will want to
|
|
|
|
# change this setting.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_INSTALL_CMAKE_PROJECTS
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# List of four values that specify what project to install. The four values
|
|
|
|
# are: Build directory, Project Name, Project Component, Directory. If
|
|
|
|
# omitted, CPack will build an installer that installers everything.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_SYSTEM_NAME
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# System name, defaults to the value of ${CMAKE_SYSTEM_NAME}.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_VERSION
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Package full version, used internally. By default, this is built from
|
|
|
|
# CPACK_PACKAGE_VERSION_MAJOR, CPACK_PACKAGE_VERSION_MINOR, and
|
|
|
|
# CPACK_PACKAGE_VERSION_PATCH.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_TOPLEVEL_TAG
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Directory for the installed files.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_INSTALL_COMMANDS
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Extra commands to install components.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_INSTALLED_DIRECTORIES
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Extra directories to install.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# Registry key used when installing this project. This is only used by
|
|
|
|
# installer for Windows. The default value is based on the installation
|
|
|
|
# directory.
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# .. variable:: CPACK_CREATE_DESKTOP_LINKS
|
2013-10-15 19:17:36 +04:00
|
|
|
#
|
2013-10-15 21:23:23 +04:00
|
|
|
# List of desktop links to create.
|
2014-02-04 21:40:45 +04:00
|
|
|
# Each desktop link requires a corresponding start menu shortcut
|
|
|
|
# as created by :variable:`CPACK_PACKAGE_EXECUTABLES`.
|
2008-07-08 19:52:25 +04:00
|
|
|
|
2009-09-28 19:46:51 +04:00
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2006-2009 Kitware, Inc.
|
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
2010-08-07 04:48:47 +04:00
|
|
|
# (To distribute this file outside of CMake, substitute the full
|
2009-09-28 19:46:51 +04:00
|
|
|
# License text for the above reference.)
|
2006-06-12 22:21:36 +04:00
|
|
|
|
2011-04-03 23:57:53 +04:00
|
|
|
# Define this var in order to avoid (or warn) concerning multiple inclusion
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CPack_CMake_INCLUDED)
|
|
|
|
message(WARNING "CPack.cmake has already been included!!")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPack_CMake_INCLUDED 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2011-04-03 23:57:53 +04:00
|
|
|
|
2006-01-04 23:14:09 +03:00
|
|
|
# Pick a configuration file
|
2012-08-13 21:47:32 +04:00
|
|
|
set(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
|
|
|
|
if(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
|
|
|
|
set(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
|
|
|
|
if(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
|
|
|
|
set(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2011-04-03 23:57:53 +04:00
|
|
|
# Backward compatibility
|
|
|
|
# Include CPackComponent macros if it has not already been included before.
|
|
|
|
include(CPackComponent)
|
2008-07-08 19:52:25 +04:00
|
|
|
|
2006-01-04 23:14:09 +03:00
|
|
|
# Macro for setting values if a user did not overwrite them
|
2012-08-13 21:47:32 +04:00
|
|
|
macro(cpack_set_if_not_set name value)
|
|
|
|
if(NOT DEFINED "${name}")
|
|
|
|
set(${name} "${value}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endmacro()
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2012-01-03 03:54:08 +04:00
|
|
|
# cpack_encode_variables - Macro to encode variables for the configuration file
|
2011-04-03 23:57:53 +04:00
|
|
|
# find any variable that starts with CPACK and create a variable
|
2006-06-16 05:43:59 +04:00
|
|
|
# _CPACK_OTHER_VARIABLES_ that contains SET commands for
|
|
|
|
# each cpack variable. _CPACK_OTHER_VARIABLES_ is then
|
|
|
|
# used as an @ replacment in configure_file for the CPackConfig.
|
2012-08-13 21:47:32 +04:00
|
|
|
macro(cpack_encode_variables)
|
|
|
|
set(_CPACK_OTHER_VARIABLES_)
|
|
|
|
get_cmake_property(res VARIABLES)
|
|
|
|
foreach(var ${res})
|
|
|
|
if("xxx${var}" MATCHES "xxxCPACK")
|
|
|
|
set(_CPACK_OTHER_VARIABLES_
|
2007-10-31 06:02:43 +03:00
|
|
|
"${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endmacro()
|
2006-04-15 21:02:18 +04:00
|
|
|
|
2006-01-04 23:14:09 +03:00
|
|
|
# Set the package name
|
2006-04-10 21:44:39 +04:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
2006-01-04 23:14:09 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MAJOR "0")
|
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MINOR "1")
|
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_VERSION_PATCH "1")
|
2006-02-23 17:38:40 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_VERSION
|
|
|
|
"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
2006-01-04 23:14:09 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_VENDOR "Humanity")
|
2006-01-10 02:20:02 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
|
2006-04-10 21:44:39 +04:00
|
|
|
"${CMAKE_PROJECT_NAME} built using CMake")
|
2006-02-28 22:18:13 +03:00
|
|
|
|
2006-01-10 02:20:02 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_FILE
|
|
|
|
"${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
|
2006-02-28 22:18:13 +03:00
|
|
|
cpack_set_if_not_set(CPACK_RESOURCE_FILE_LICENSE
|
|
|
|
"${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt")
|
|
|
|
cpack_set_if_not_set(CPACK_RESOURCE_FILE_README
|
|
|
|
"${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
|
|
|
|
cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
|
|
|
|
"${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt")
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2006-10-12 21:05:50 +04:00
|
|
|
cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL)
|
|
|
|
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
|
|
|
if(CPACK_NSIS_MODIFY_PATH)
|
|
|
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
|
|
|
set(__cpack_system_name ${CMAKE_SYSTEM_NAME})
|
|
|
|
if(${__cpack_system_name} MATCHES Windows)
|
|
|
|
if(CMAKE_CL_64)
|
|
|
|
set(__cpack_system_name win64)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(__cpack_system_name win32)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
2006-04-24 03:45:43 +04:00
|
|
|
cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
|
|
|
|
|
2011-01-10 18:05:13 +03:00
|
|
|
# Root dir: default value should be the string literal "$PROGRAMFILES"
|
|
|
|
# for backwards compatibility. Projects may set this value to anything.
|
|
|
|
set(__cpack_root_default "$PROGRAMFILES")
|
|
|
|
cpack_set_if_not_set(CPACK_NSIS_INSTALL_ROOT "${__cpack_root_default}")
|
|
|
|
|
2006-01-04 23:14:09 +03:00
|
|
|
# <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>
|
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME
|
2008-03-27 03:12:17 +03:00
|
|
|
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
|
2006-02-23 17:38:40 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY
|
|
|
|
"${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
|
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
|
2011-07-29 22:23:22 +04:00
|
|
|
"${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
2007-12-27 00:57:13 +03:00
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
|
|
|
cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")
|
|
|
|
|
|
|
|
# always force to exactly "true" or "false" for CPack.Info.plist.in:
|
|
|
|
if(CPACK_PACKAGE_RELOCATABLE)
|
|
|
|
set(CPACK_PACKAGE_RELOCATABLE "true")
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2007-12-27 00:57:13 +03:00
|
|
|
set(CPACK_PACKAGE_RELOCATABLE "false")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2007-08-03 23:26:30 +04:00
|
|
|
macro(cpack_check_file_exists file description)
|
|
|
|
if(NOT EXISTS "${file}")
|
|
|
|
message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endmacro()
|
2007-08-03 23:26:30 +04:00
|
|
|
|
2006-02-28 22:18:13 +03:00
|
|
|
cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description")
|
|
|
|
cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource")
|
|
|
|
cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource")
|
|
|
|
cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource")
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2007-08-03 23:26:30 +04:00
|
|
|
macro(cpack_optional_append _list _cond _item)
|
|
|
|
if(${_cond})
|
|
|
|
set(${_list} ${${_list}} ${_item})
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endmacro()
|
2007-08-03 23:26:30 +04:00
|
|
|
|
2013-10-15 21:23:23 +04:00
|
|
|
#.rst:
|
|
|
|
# .. variable:: CPACK_BINARY_<GENNAME>
|
|
|
|
#
|
|
|
|
# CPack generated options for binary generators. The CPack.cmake module
|
|
|
|
# generates (when CPACK_GENERATOR is not set) a set of CMake options (see
|
|
|
|
# CMake option command) which may then be used to select the CPack
|
|
|
|
# generator(s) to be used when launching the package target.
|
|
|
|
#
|
|
|
|
# Provide options to choose generators we might check here if the required
|
|
|
|
# tools for the generates exist and set the defaults according to the results
|
2007-08-03 23:26:30 +04:00
|
|
|
if(NOT CPACK_GENERATOR)
|
|
|
|
if(UNIX)
|
|
|
|
if(CYGWIN)
|
2008-04-18 01:23:21 +04:00
|
|
|
option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2007-08-03 23:26:30 +04:00
|
|
|
if(APPLE)
|
2008-06-18 17:53:29 +04:00
|
|
|
option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF)
|
2009-01-22 20:12:44 +03:00
|
|
|
option(CPACK_BINARY_DRAGNDROP "Enable to build OSX Drag And Drop package" OFF)
|
2013-11-01 23:36:26 +04:00
|
|
|
option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" OFF)
|
2008-04-18 01:23:21 +04:00
|
|
|
option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2008-04-18 01:23:21 +04:00
|
|
|
option(CPACK_BINARY_TZ "Enable to build TZ packages" ON)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2008-04-18 01:23:21 +04:00
|
|
|
option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON)
|
|
|
|
option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON)
|
2009-01-23 21:36:22 +03:00
|
|
|
option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" OFF)
|
2008-04-18 01:23:21 +04:00
|
|
|
option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF)
|
|
|
|
option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF)
|
|
|
|
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
else()
|
2008-04-18 01:23:21 +04:00
|
|
|
option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
|
2012-10-03 18:08:49 +04:00
|
|
|
option(CPACK_BINARY_WIX "Enable to build WiX packages" OFF)
|
2009-01-23 21:36:22 +03:00
|
|
|
option(CPACK_BINARY_ZIP "Enable to build ZIP packages" OFF)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2008-06-18 17:53:29 +04:00
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle)
|
2009-01-22 20:12:44 +03:00
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop)
|
2008-04-18 01:23:21 +04:00
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_RPM RPM)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_STGZ STGZ)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
|
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
|
2012-10-03 18:08:49 +04:00
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_WIX WIX)
|
2008-04-18 01:23:21 +04:00
|
|
|
cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2007-08-03 23:26:30 +04:00
|
|
|
|
|
|
|
# Provide options to choose source generators
|
|
|
|
if(NOT CPACK_SOURCE_GENERATOR)
|
|
|
|
if(UNIX)
|
|
|
|
if(CYGWIN)
|
|
|
|
option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2007-08-03 23:26:30 +04:00
|
|
|
option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON)
|
|
|
|
option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON)
|
|
|
|
option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON)
|
|
|
|
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
else()
|
2007-08-03 23:26:30 +04:00
|
|
|
option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2007-08-03 23:26:30 +04:00
|
|
|
|
|
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource)
|
|
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ)
|
|
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2)
|
|
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ)
|
|
|
|
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2007-09-01 00:27:08 +04:00
|
|
|
# mark the above options as advanced
|
2008-04-18 01:23:21 +04:00
|
|
|
mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
|
2012-08-13 21:42:58 +04:00
|
|
|
CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
|
|
|
|
CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
|
2012-10-03 18:08:49 +04:00
|
|
|
CPACK_BINARY_NSIS CPACK_BINARY_WIX CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
|
2012-08-13 21:42:58 +04:00
|
|
|
CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
|
2009-01-22 20:12:44 +03:00
|
|
|
CPACK_SOURCE_TZ CPACK_SOURCE_ZIP CPACK_BINARY_DRAGNDROP)
|
2007-09-01 00:27:08 +04:00
|
|
|
|
2006-01-04 23:14:09 +03:00
|
|
|
# Set some other variables
|
2006-04-10 19:09:52 +04:00
|
|
|
cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS
|
2006-04-14 16:58:13 +04:00
|
|
|
"${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/")
|
2006-04-10 21:44:39 +04:00
|
|
|
cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
|
2006-04-24 03:45:43 +04:00
|
|
|
cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}")
|
2009-11-13 01:58:37 +03:00
|
|
|
# if the user has set CPACK_NSIS_DISPLAY_NAME remember it
|
|
|
|
if(DEFINED CPACK_NSIS_DISPLAY_NAME)
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_NSIS_DISPLAY_NAME_SET TRUE)
|
2009-11-13 01:58:37 +03:00
|
|
|
endif()
|
|
|
|
# if the user has set CPACK_NSIS_DISPLAY
|
|
|
|
# explicitly, then use that as the default
|
|
|
|
# value of CPACK_NSIS_PACKAGE_NAME instead
|
2012-08-13 21:42:58 +04:00
|
|
|
# of CPACK_PACKAGE_INSTALL_DIRECTORY
|
2009-03-05 18:08:03 +03:00
|
|
|
cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
2009-11-13 01:58:37 +03:00
|
|
|
|
|
|
|
if(CPACK_NSIS_DISPLAY_NAME_SET)
|
2012-08-13 21:42:58 +04:00
|
|
|
string(REPLACE "\\" "\\\\"
|
2009-11-13 01:58:37 +03:00
|
|
|
_NSIS_DISPLAY_NAME_TMP "${CPACK_NSIS_DISPLAY_NAME}")
|
|
|
|
cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${_NSIS_DISPLAY_NAME_TMP}")
|
|
|
|
else()
|
|
|
|
cpack_set_if_not_set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
|
|
|
endif()
|
2006-04-30 04:01:34 +04:00
|
|
|
|
2006-06-12 22:21:36 +04:00
|
|
|
cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE
|
|
|
|
"${CMAKE_BINARY_DIR}/CPackConfig.cmake")
|
|
|
|
|
|
|
|
cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE
|
|
|
|
"${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
|
|
|
|
|
2007-10-31 15:50:17 +03:00
|
|
|
cpack_set_if_not_set(CPACK_SET_DESTDIR OFF)
|
2007-02-13 22:13:51 +03:00
|
|
|
cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
|
|
|
|
2007-10-22 19:40:07 +04:00
|
|
|
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
|
2007-10-29 15:11:44 +03:00
|
|
|
cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
|
|
|
|
2012-10-03 18:08:49 +04:00
|
|
|
# WiX specific variables
|
|
|
|
cpack_set_if_not_set(CPACK_WIX_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P}")
|
|
|
|
|
2013-11-01 15:31:07 +04:00
|
|
|
# set sysroot so SDK tools can be used
|
2013-11-01 06:14:58 +04:00
|
|
|
if(CMAKE_OSX_SYSROOT)
|
2013-11-01 15:31:07 +04:00
|
|
|
cpack_set_if_not_set(CPACK_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
|
2013-11-01 06:14:58 +04:00
|
|
|
endif()
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(DEFINED CPACK_COMPONENTS_ALL)
|
|
|
|
if(CPACK_MONOLITHIC_INSTALL)
|
|
|
|
message("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
|
|
|
|
set(CPACK_COMPONENTS_ALL)
|
2012-08-13 21:50:14 +04:00
|
|
|
else()
|
2008-07-08 19:52:25 +04:00
|
|
|
# The user has provided the set of components to be installed as
|
|
|
|
# part of a component-based installation; trust her.
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
else()
|
2008-07-08 19:52:25 +04:00
|
|
|
# If the user has not specifically requested a monolithic installer
|
|
|
|
# but has specified components in various "install" commands, tell
|
|
|
|
# CPack about those components.
|
2012-08-13 21:47:32 +04:00
|
|
|
if(NOT CPACK_MONOLITHIC_INSTALL)
|
|
|
|
get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
|
|
|
|
list(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
|
|
|
|
if(CPACK_COMPONENTS_LEN EQUAL 1)
|
2008-07-08 19:52:25 +04:00
|
|
|
# Only one component: this is not a component-based installation
|
|
|
|
# (at least, it isn't a component-based installation, but may
|
|
|
|
# become one later if the user uses the cpack_add_* commands).
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_COMPONENTS_ALL)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_COMPONENTS_LEN)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif()
|
2008-07-08 19:52:25 +04:00
|
|
|
|
|
|
|
# CMake always generates a component named "Unspecified", which is
|
|
|
|
# used to install everything that doesn't have an explicitly-provided
|
|
|
|
# component. Since these files should always be installed, we'll make
|
|
|
|
# them hidden and required.
|
|
|
|
set(CPACK_COMPONENT_UNSPECIFIED_HIDDEN TRUE)
|
|
|
|
set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED TRUE)
|
|
|
|
|
2007-10-23 01:16:33 +04:00
|
|
|
cpack_encode_variables()
|
2013-11-13 12:50:56 +04:00
|
|
|
configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY)
|
2006-01-04 23:14:09 +03:00
|
|
|
|
2006-04-15 21:02:18 +04:00
|
|
|
# Generate source file
|
|
|
|
cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES
|
|
|
|
"${CMAKE_SOURCE_DIR};/")
|
2006-04-24 03:45:43 +04:00
|
|
|
cpack_set_if_not_set(CPACK_SOURCE_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}-Source")
|
2006-04-15 21:02:18 +04:00
|
|
|
cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
2008-03-27 03:12:17 +03:00
|
|
|
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source")
|
2006-04-15 21:02:18 +04:00
|
|
|
cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES
|
2010-03-08 18:43:42 +03:00
|
|
|
"/CVS/;/\\\\\\\\.svn/;/\\\\\\\\.bzr/;/\\\\\\\\.hg/;/\\\\\\\\.git/;\\\\\\\\.swp$;\\\\\\\\.#;/#")
|
2012-08-13 21:47:32 +04:00
|
|
|
set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
|
|
|
|
set(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
|
|
|
|
set(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
|
|
|
|
set(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
|
|
|
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
|
|
|
|
set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
|
|
|
|
set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
|
2006-02-27 18:58:20 +03:00
|
|
|
|
2006-04-15 21:02:18 +04:00
|
|
|
cpack_encode_variables()
|
2007-08-03 23:26:30 +04:00
|
|
|
configure_file("${cpack_source_input_file}"
|
2013-11-13 12:50:56 +04:00
|
|
|
"${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY)
|