<?xml version="1.0" ?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"> ]>
<article>
<articleinfo>
<title>cpack - cpack</title>
</articleinfo>
<sect1 id="cpack.Name">
<title>Name</title>
<para>
<programlisting>  cpack - Packaging driver provided by CMake.</programlisting>
</para>
</sect1>
<sect1 id="cpack.Usage">
<title>Usage</title>
<para>
<programlisting>  cpack -G &lt;generator&gt; [options]</programlisting>
</para>
</sect1>
<sect1 id="cpack.Description">
<title>Description</title>
<para>The "cpack" executable is the CMake packaging program.  CMake-generated build trees created for projects that use the INSTALL_* commands have packaging support.  This program will generate the package.</para>
<para>CMake is a cross-platform build system generator.  Projects specify their build process with platform-independent CMake listfiles included in each directory of a source tree with the name CMakeLists.txt. Users build a project by using CMake to generate a build system for a native tool on their platform.</para>
</sect1>
<sect1 id="cpack.Options">
<title>Options</title>
<sect2 id="cpack.opt._G__generator_">
<title>-G &lt;generator&gt;</title>
<abstract>
<para>Use the specified generator to generate package.</para>
</abstract>
<para>CPack may support multiple native packaging systems on certain platforms. A generator is responsible for generating input files for particular system and invoking that systems. Possible generator names are specified in the Generators section.</para>
</sect2>
<sect2 id="cpack.opt._C__Configuration_">
<title>-C &lt;Configuration&gt;</title>
<abstract>
<para>Specify the project configuration</para>
</abstract>
<para>This option specifies the configuration that the project was build with, for example 'Debug', 'Release'.</para>
</sect2>
<sect2 id="cpack.opt._D__var___value_">
<title>-D &lt;var&gt;=&lt;value&gt;</title>
<abstract>
<para>Set a CPack variable.</para>
</abstract>
<para>Set a variable that can be used by the generator.</para>
</sect2>
<sect2 id="cpack.opt.__config__config_file_">
<title>--config &lt;config file&gt;</title>
<abstract>
<para>Specify the config file.</para>
</abstract>
<para>Specify the config file to use to create the package. By default CPackConfig.cmake in the current directory will be used.</para>
</sect2>
<sect2 id="cpack.opt.__verbose__V">
<title>--verbose,-V</title>
<abstract>
<para>enable verbose output</para>
</abstract>
<para>Run cpack with verbose output.</para>
</sect2>
<sect2 id="cpack.opt.__debug">
<title>--debug</title>
<abstract>
<para>enable debug output (for CPack developers)</para>
</abstract>
<para>Run cpack with debug output (for CPack developers).</para>
</sect2>
<sect2 id="cpack.opt._P__package_name_">
<title>-P &lt;package name&gt;</title>
<abstract>
<para>override/define CPACK_PACKAGE_NAME</para>
</abstract>
<para>If the package name is not specified on cpack commmand line thenCPack.cmake defines it as CMAKE_PROJECT_NAME</para>
</sect2>
<sect2 id="cpack.opt._R__package_version_">
<title>-R &lt;package version&gt;</title>
<abstract>
<para>override/define CPACK_PACKAGE_VERSION</para>
</abstract>
<para>If version is not specified on cpack command line thenCPack.cmake defines it from CPACK_PACKAGE_VERSION_[MAJOR|MINOR|PATCH]look into CPack.cmake for detail</para>
</sect2>
<sect2 id="cpack.opt._B__package_directory_">
<title>-B &lt;package directory&gt;</title>
<abstract>
<para>override/define CPACK_PACKAGE_DIRECTORY</para>
</abstract>
<para>The directory where CPack will be doing its packaging work.The resulting package will be found there. Inside this directoryCPack creates '_CPack_Packages' sub-directory which is theCPack temporary directory.</para>
</sect2>
<sect2 id="cpack.opt.__vendor__vendor_name_">
<title>--vendor &lt;vendor name&gt;</title>
<abstract>
<para>override/define CPACK_PACKAGE_VENDOR</para>
</abstract>
<para>If vendor is not specified on cpack command line (or inside CMakeLists.txt) thenCPack.cmake defines it with a default value</para>
</sect2>
<sect2 id="cpack.opt.__help_command_cmd__file_">
<title>--help-command cmd [file]</title>
<abstract>
<para>Print help for a single command and exit.</para>
</abstract>
<para>Full documentation specific to the given command is displayed. If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.</para>
</sect2>
<sect2 id="cpack.opt.__help_command_list__file_">
<title>--help-command-list [file]</title>
<abstract>
<para>List available commands and exit.</para>
</abstract>
<para>The list contains all commands for which help may be obtained by using the --help-command argument followed by a command name. If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.</para>
</sect2>
<sect2 id="cpack.opt.__help_commands__file_">
<title>--help-commands [file]</title>
<abstract>
<para>Print help for all commands and exit.</para>
</abstract>
<para>Full documentation specific for all current command is displayed.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.</para>
</sect2>
<sect2 id="cpack.opt.__help_variable_var__file_">
<title>--help-variable var [file]</title>
<abstract>
<para>Print help for a single variable and exit.</para>
</abstract>
<para>Full documentation specific to the given variable is displayed.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.</para>
</sect2>
<sect2 id="cpack.opt.__help_variable_list__file_">
<title>--help-variable-list [file]</title>
<abstract>
<para>List documented variables and exit.</para>
</abstract>
<para>The list contains all variables for which help may be obtained by using the --help-variable argument followed by a variable name.  If a file is specified, the help is written into it.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.</para>
</sect2>
<sect2 id="cpack.opt.__help_variables__file_">
<title>--help-variables [file]</title>
<abstract>
<para>Print help for all variables and exit.</para>
</abstract>
<para>Full documentation for all variables is displayed.If a file is specified, the documentation is written into and the output format is determined depending on the filename suffix. Supported are man page, HTML, DocBook and plain text.</para>
</sect2>
<sect2 id="cpack.opt.__copyright__file_">
<title>--copyright [file]</title>
<abstract>
<para>Print the CMake copyright and exit.</para>
</abstract>
<para>If a file is specified, the copyright is written into it.</para>
</sect2>
<sect2 id="cpack.opt.__help__help__usage__h__H___">
<title>--help,-help,-usage,-h,-H,/?</title>
<abstract>
<para>Print usage information and exit.</para>
</abstract>
<para>Usage describes the basic command line interface and its options.</para>
</sect2>
<sect2 id="cpack.opt.__help_full__file_">
<title>--help-full [file]</title>
<abstract>
<para>Print full help and exit.</para>
</abstract>
<para>Full help displays most of the documentation provided by the UNIX man page.  It is provided for use on non-UNIX platforms, but is also convenient if the man page is not installed.  If a file is specified, the help is written into it.</para>
</sect2>
<sect2 id="cpack.opt.__help_html__file_">
<title>--help-html [file]</title>
<abstract>
<para>Print full help in HTML format.</para>
</abstract>
<para>This option is used by CMake authors to help produce web pages.  If a file is specified, the help is written into it.</para>
</sect2>
<sect2 id="cpack.opt.__help_man__file_">
<title>--help-man [file]</title>
<abstract>
<para>Print full help as a UNIX man page and exit.</para>
</abstract>
<para>This option is used by the cmake build to generate the UNIX man page.  If a file is specified, the help is written into it.</para>
</sect2>
<sect2 id="cpack.opt.__version__version__V__file_">
<title>--version,-version,/V [file]</title>
<abstract>
<para>Show program name/version banner and exit.</para>
</abstract>
<para>If a file is specified, the version is written into it.</para>
</sect2>
</sect1>
<sect1 id="cpack.Generators">
<title>Generators</title>
<sect2 id="cpack.gen.NSIS">
<title>NSIS</title>
<para>Null Soft Installer</para>
</sect2>
<sect2 id="cpack.gen.NSIS64">
<title>NSIS64</title>
<para>Null Soft Installer (64-bit)</para>
</sect2>
<sect2 id="cpack.gen.STGZ">
<title>STGZ</title>
<para>Self extracting Tar GZip compression</para>
</sect2>
<sect2 id="cpack.gen.TBZ2">
<title>TBZ2</title>
<para>Tar BZip2 compression</para>
</sect2>
<sect2 id="cpack.gen.TGZ">
<title>TGZ</title>
<para>Tar GZip compression</para>
</sect2>
<sect2 id="cpack.gen.TZ">
<title>TZ</title>
<para>Tar Compress compression</para>
</sect2>
<sect2 id="cpack.gen.WIX">
<title>WIX</title>
<para>MSI file format via WiX tools</para>
</sect2>
<sect2 id="cpack.gen.ZIP">
<title>ZIP</title>
<para>ZIP file format</para>
</sect2>
</sect1>
<sect1 id="cpack.Commands">
<title>Commands</title>
<sect2 id="cpack.command.cpack_add_component">
<title>cpack_add_component</title>
<abstract>
<para>Describes a CPack installation component named by the COMPONENT argument to a CMake INSTALL command.</para>
</abstract>
<para>
<programlisting>  cpack_add_component(compname
                      [DISPLAY_NAME name]
                      [DESCRIPTION description]
                      [HIDDEN | REQUIRED | DISABLED ]
                      [GROUP group]
                      [DEPENDS comp1 comp2 ... ]
                      [INSTALL_TYPES type1 type2 ... ]
                      [DOWNLOADED]
                      [ARCHIVE_FILE filename])
</programlisting>
</para>
<para>
</para>
<para>The cmake_add_component command describes an installation component, which the user can opt to install or remove as part of the graphical installation process. compname is the name of the component, as provided to the COMPONENT argument of one or more CMake INSTALL commands.
</para>
<para>DISPLAY_NAME is the displayed name of the component, used in graphical installers to display the component name. This value can be any string.
</para>
<para>DESCRIPTION is an extended description of the component, used in graphical installers to give the user additional information about the component. Descriptions can span multiple lines using "\n" as the line separator. Typically, these descriptions should be no more than a few lines long.
</para>
<para>HIDDEN indicates that this component will be hidden in the graphical installer, so that the user cannot directly change whether it is installed or not.
</para>
<para>REQUIRED indicates that this component is required, and therefore will always be installed. It will be visible in the graphical installer, but it cannot be unselected. (Typically, required components are shown greyed out).
</para>
<para>DISABLED indicates that this component should be disabled (unselected) by default. The user is free to select this component for installation, unless it is also HIDDEN.
</para>
<para>DEPENDS lists the components on which this component depends. If this component is selected, then each of the components listed must also be selected. The dependency information is encoded within the installer itself, so that users cannot install inconsistent sets of components.
</para>
<para>GROUP names the component group of which this component is a part. If not provided, the component will be a standalone component, not part of any component group. Component groups are described with the cpack_add_component_group command, detailed below.
</para>
<para>INSTALL_TYPES lists the installation types of which this component is a part. When one of these installations types is selected, this component will automatically be selected. Installation types are described with the cpack_add_install_type command, detailed below.
</para>
<para>DOWNLOADED indicates that this component should be downloaded on-the-fly by the installer, rather than packaged in with the installer itself. For more information, see the cpack_configure_downloads command.
</para>
<para>ARCHIVE_FILE provides a name for the archive file created by CPack to be used for downloaded components. If not supplied, CPack will create a file with some name based on CPACK_PACKAGE_FILE_NAME and the name of the component. See cpack_configure_downloads for more information.</para>
</sect2>
<sect2 id="cpack.command.cpack_add_component_group">
<title>cpack_add_component_group</title>
<abstract>
<para>Describes a group of related CPack installation components.</para>
</abstract>
<para>
<programlisting>  cpack_add_component_group(groupname
                           [DISPLAY_NAME name]
                           [DESCRIPTION description]
                           [PARENT_GROUP parent]
                           [EXPANDED]
                           [BOLD_TITLE])
</programlisting>
</para>
<para>
</para>
<para>The cpack_add_component_group describes a group of installation components, which will be placed together within the listing of options. Typically, component groups allow the user to select/deselect all of the components within a single group via a single group-level option. Use component groups to reduce the complexity of installers with many options. groupname is an arbitrary name used to identify the group in the GROUP argument of the cpack_add_component command, which is used to place a component in a group. The name of the group must not conflict with the name of any component.
</para>
<para>DISPLAY_NAME is the displayed name of the component group, used in graphical installers to display the component group name. This value can be any string.
</para>
<para>DESCRIPTION is an extended description of the component group, used in graphical installers to give the user additional information about the components within that group. Descriptions can span multiple lines using "\n" as the line separator. Typically, these descriptions should be no more than a few lines long.
</para>
<para>PARENT_GROUP, if supplied, names the parent group of this group. Parent groups are used to establish a hierarchy of groups, providing an arbitrary hierarchy of groups.
</para>
<para>EXPANDED indicates that, by default, the group should show up as "expanded", so that the user immediately sees all of the components within the group. Otherwise, the group will initially show up as a single entry.
</para>
<para>BOLD_TITLE indicates that the group title should appear in bold, to call the user's attention to the group.</para>
</sect2>
<sect2 id="cpack.command.cpack_add_install_type">
<title>cpack_add_install_type</title>
<abstract>
<para>Add a new installation type containing a set of predefined component selections to the graphical installer.</para>
</abstract>
<para>
<programlisting>  cpack_add_install_type(typename
                         [DISPLAY_NAME name])
</programlisting>
</para>
<para>
</para>
<para>The cpack_add_install_type command identifies a set of preselected components that represents a common use case for an application. For example, a "Developer" install type might include an application along with its header and library files, while an "End user" install type might just include the application's executable. Each component identifies itself with one or more install types via the INSTALL_TYPES argument to cpack_add_component.
</para>
<para>DISPLAY_NAME is the displayed name of the install type, which will typically show up in a drop-down box within a graphical installer. This value can be any string.</para>
</sect2>
<sect2 id="cpack.command.cpack_configure_downloads">
<title>cpack_configure_downloads</title>
<abstract>
<para>Configure CPack to download selected components on-the-fly as part of the installation process.</para>
</abstract>
<para>
<programlisting>  cpack_configure_downloads(site
                            [UPLOAD_DIRECTORY dirname]
                            [ALL]
                            [ADD_REMOVE|NO_ADD_REMOVE])
</programlisting>
</para>
<para>
</para>
<para>The cpack_configure_downloads command configures installation-time downloads of selected components. For each downloadable component, CPack will create an archive containing the contents of that component, which should be uploaded to the given site. When the user selects that component for installation, the installer will download and extract the component in place. This feature is useful for creating small installers that only download the requested components, saving bandwidth. Additionally, the installers are small enough that they will be installed as part of the normal installation process, and the "Change" button in Windows Add/Remove Programs control panel will allow one to add or remove parts of the application after the original installation. On Windows, the downloaded-components functionality requires the ZipDLL plug-in for NSIS, available at:
</para>
<para>
<programlisting>  <ulink url="http://nsis.sourceforge.net/ZipDLL_plug-in" />
</programlisting>
</para>
<para>
</para>
<para>On Mac OS X, installers that download components on-the-fly can only be built and installed on system using Mac OS X 10.5 or later.
</para>
<para>The site argument is a URL where the archives for downloadable components will reside, e.g., <ulink url="http://www.cmake.org/files/2.6.1/installer/" /> All of the archives produced by CPack should be uploaded to that location.
</para>
<para>UPLOAD_DIRECTORY is the local directory where CPack will create the various archives for each of the components. The contents of this directory should be uploaded to a location accessible by the URL given in the site argument. If omitted, CPack will use the directory CPackUploads inside the CMake binary directory to store the generated archives.
</para>
<para>The ALL flag indicates that all components be downloaded. Otherwise, only those components explicitly marked as DOWNLOADED or that have a specified ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies ADD_REMOVE (unless NO_ADD_REMOVE is specified).
</para>
<para>ADD_REMOVE indicates that CPack should install a copy of the installer that can be called from Windows' Add/Remove Programs dialog (via the "Modify" button) to change the set of installed components. NO_ADD_REMOVE turns off this behavior. This option is ignored on Mac OS X.</para>
</sect2>
<sect2 id="cpack.command.break">
<title>break</title>
<abstract>
<para>Break from an enclosing foreach or while loop.</para>
</abstract>
<para>
<programlisting>  break()
</programlisting>
</para>
<para>Breaks from an enclosing foreach loop or while loop</para>
</sect2>
<sect2 id="cpack.command.cmake_host_system_information">
<title>cmake_host_system_information</title>
<abstract>
<para>Query host system specific information.</para>
</abstract>
<para>
<programlisting>  cmake_host_system_information(RESULT &lt;variable&gt; QUERY &lt;key&gt; ...)
</programlisting>
</para>
<para>Queries system information of the host system on which cmake runs. One or more &lt;key&gt; can be provided to select the information to be queried. The list of queried values is stored in &lt;variable&gt;.
</para>
<para>&lt;key&gt; can be one of the following values:
</para>
<para>
<programlisting>  NUMBER_OF_LOGICAL_CORES   = Number of logical cores.
  NUMBER_OF_PHYSICAL_CORES  = Number of physical cores.
  HOSTNAME                  = Hostname.
  FQDN                      = Fully qualified domain name.
  TOTAL_VIRTUAL_MEMORY      = Total virtual memory in megabytes.
  AVAILABLE_VIRTUAL_MEMORY  = Available virtual memory in megabytes.
  TOTAL_PHYSICAL_MEMORY     = Total physical memory in megabytes.
  AVAILABLE_PHYSICAL_MEMORY = Available physical memory in megabytes.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.command.cmake_minimum_required">
<title>cmake_minimum_required</title>
<abstract>
<para>Set the minimum required version of cmake for a project.</para>
</abstract>
<para>
<programlisting>  cmake_minimum_required(VERSION major[.minor[.patch[.tweak]]]
                         [FATAL_ERROR])
</programlisting>
</para>
<para>If the current version of CMake is lower than that required it will stop processing the project and report an error.  When a version higher than 2.4 is specified the command implicitly invokes
</para>
<para>
<programlisting>  cmake_policy(VERSION major[.minor[.patch[.tweak]]])
</programlisting>
</para>
<para>which sets the cmake policy version level to the version specified.  When version 2.4 or lower is given the command implicitly invokes
</para>
<para>
<programlisting>  cmake_policy(VERSION 2.4)
</programlisting>
</para>
<para>which enables compatibility features for CMake 2.4 and lower.
</para>
<para>The FATAL_ERROR option is accepted but ignored by CMake 2.6 and higher.  It should be specified so CMake versions 2.4 and lower fail with an error instead of just a warning.</para>
</sect2>
<sect2 id="cpack.command.cmake_policy">
<title>cmake_policy</title>
<abstract>
<para>Manage CMake Policy settings.</para>
</abstract>
<para>As CMake evolves it is sometimes necessary to change existing behavior in order to fix bugs or improve implementations of existing features.  The CMake Policy mechanism is designed to help keep existing projects building as new versions of CMake introduce changes in behavior.  Each new policy (behavioral change) is given an identifier of the form "CMP&lt;NNNN&gt;" where "&lt;NNNN&gt;" is an integer index.  Documentation associated with each policy describes the OLD and NEW behavior and the reason the policy was introduced.  Projects may set each policy to select the desired behavior.  When CMake needs to know which behavior to use it checks for a setting specified by the project.  If no setting is available the OLD behavior is assumed and a warning is produced requesting that the policy be set.
</para>
<para>The cmake_policy command is used to set policies to OLD or NEW behavior.  While setting policies individually is supported, we encourage projects to set policies based on CMake versions.
</para>
<para>
<programlisting>  cmake_policy(VERSION major.minor[.patch[.tweak]])
</programlisting>
</para>
<para>Specify that the current CMake list file is written for the given version of CMake.  All policies introduced in the specified version or earlier will be set to use NEW behavior.  All policies introduced after the specified version will be unset (unless variable CMAKE_POLICY_DEFAULT_CMP&lt;NNNN&gt; sets a default).  This effectively requests behavior preferred as of a given CMake version and tells newer CMake versions to warn about their new policies.  The policy version specified must be at least 2.4 or the command will report an error.  In order to get compatibility features supporting versions earlier than 2.4 see documentation of policy CMP0001.
</para>
<para>
<programlisting>  cmake_policy(SET CMP&lt;NNNN&gt; NEW)
  cmake_policy(SET CMP&lt;NNNN&gt; OLD)
</programlisting>
</para>
<para>Tell CMake to use the OLD or NEW behavior for a given policy.  Projects depending on the old behavior of a given policy may silence a policy warning by setting the policy state to OLD.  Alternatively one may fix the project to work with the new behavior and set the policy state to NEW.
</para>
<para>
<programlisting>  cmake_policy(GET CMP&lt;NNNN&gt; &lt;variable&gt;)
</programlisting>
</para>
<para>Check whether a given policy is set to OLD or NEW behavior.  The output variable value will be "OLD" or "NEW" if the policy is set, and empty otherwise.
</para>
<para>CMake keeps policy settings on a stack, so changes made by the cmake_policy command affect only the top of the stack.  A new entry on the policy stack is managed automatically for each subdirectory to protect its parents and siblings.  CMake also manages a new entry for scripts loaded by include() and find_package() commands except when invoked with the NO_POLICY_SCOPE option (see also policy CMP0011).  The cmake_policy command provides an interface to manage custom entries on the policy stack:
</para>
<para>
<programlisting>  cmake_policy(PUSH)
  cmake_policy(POP)
</programlisting>
</para>
<para>Each PUSH must have a matching POP to erase any changes.  This is useful to make temporary changes to policy settings.
</para>
<para>Functions and macros record policy settings when they are created and use the pre-record policies when they are invoked.  If the function or macro implementation sets policies, the changes automatically propagate up through callers until they reach the closest nested policy stack entry.</para>
</sect2>
<sect2 id="cpack.command.configure_file">
<title>configure_file</title>
<abstract>
<para>Copy a file to another location and modify its contents.</para>
</abstract>
<para>
<programlisting>  configure_file(&lt;input&gt; &lt;output&gt;
                 [COPYONLY] [ESCAPE_QUOTES] [@ONLY] 
                 [NEWLINE_STYLE [UNIX|DOS|WIN32|LF|CRLF] ])
</programlisting>
</para>
<para>Copies a file &lt;input&gt; to file &lt;output&gt; and substitutes variable values referenced in the file content.  If &lt;input&gt; is a relative path it is evaluated with respect to the current source directory.  The &lt;input&gt; must be a file, not a directory.  If &lt;output&gt; is a relative path it is evaluated with respect to the current binary directory.  If &lt;output&gt; names an existing directory the input file is placed in that directory with its original name.  
</para>
<para>If the &lt;input&gt; file is modified the build system will re-run CMake to re-configure the file and generate the build system again.
</para>
<para>This command replaces any variables in the input file referenced as ${VAR} or @VAR@ with their values as determined by CMake.  If a variable is not defined, it will be replaced with nothing.  If COPYONLY is specified, then no variable expansion will take place.  If ESCAPE_QUOTES is specified then any substituted quotes will be C-style escaped.  The file will be configured with the current values of CMake variables. If @ONLY is specified, only variables of the form @VAR@ will be replaced and ${VAR} will be ignored.  This is useful for configuring scripts that use ${VAR}.
</para>
<para>Input file lines of the form "#cmakedefine VAR ..." will be replaced with either "#define VAR ..." or "/* #undef VAR */" depending on whether VAR is set in CMake to any value not considered a false constant by the if() command. (Content of "...", if any, is processed as above.) Input file lines of the form "#cmakedefine01 VAR" will be replaced with either "#define VAR 1" or "#define VAR 0" similarly.
</para>
<para>With NEWLINE_STYLE the line ending could be adjusted: 
</para>
<para>
<programlisting>    'UNIX' or 'LF' for \n, 'DOS', 'WIN32' or 'CRLF' for \r\n.
</programlisting>
</para>
<para>COPYONLY must not be used with NEWLINE_STYLE.
</para>
</sect2>
<sect2 id="cpack.command.else">
<title>else</title>
<abstract>
<para>Starts the else portion of an if block.</para>
</abstract>
<para>
<programlisting>  else(expression)
</programlisting>
</para>
<para>See the if command.</para>
</sect2>
<sect2 id="cpack.command.elseif">
<title>elseif</title>
<abstract>
<para>Starts the elseif portion of an if block.</para>
</abstract>
<para>
<programlisting>  elseif(expression)
</programlisting>
</para>
<para>See the if command.</para>
</sect2>
<sect2 id="cpack.command.endforeach">
<title>endforeach</title>
<abstract>
<para>Ends a list of commands in a FOREACH block.</para>
</abstract>
<para>
<programlisting>  endforeach(expression)
</programlisting>
</para>
<para>See the FOREACH command.</para>
</sect2>
<sect2 id="cpack.command.endfunction">
<title>endfunction</title>
<abstract>
<para>Ends a list of commands in a function block.</para>
</abstract>
<para>
<programlisting>  endfunction(expression)
</programlisting>
</para>
<para>See the function command.</para>
</sect2>
<sect2 id="cpack.command.endif">
<title>endif</title>
<abstract>
<para>Ends a list of commands in an if block.</para>
</abstract>
<para>
<programlisting>  endif(expression)
</programlisting>
</para>
<para>See the if command.</para>
</sect2>
<sect2 id="cpack.command.endmacro">
<title>endmacro</title>
<abstract>
<para>Ends a list of commands in a macro block.</para>
</abstract>
<para>
<programlisting>  endmacro(expression)
</programlisting>
</para>
<para>See the macro command.</para>
</sect2>
<sect2 id="cpack.command.endwhile">
<title>endwhile</title>
<abstract>
<para>Ends a list of commands in a while block.</para>
</abstract>
<para>
<programlisting>  endwhile(expression)
</programlisting>
</para>
<para>See the while command.</para>
</sect2>
<sect2 id="cpack.command.execute_process">
<title>execute_process</title>
<abstract>
<para>Execute one or more child processes.</para>
</abstract>
<para>
<programlisting>  execute_process(COMMAND &lt;cmd1&gt; [args1...]]
                  [COMMAND &lt;cmd2&gt; [args2...] [...]]
                  [WORKING_DIRECTORY &lt;directory&gt;]
                  [TIMEOUT &lt;seconds&gt;]
                  [RESULT_VARIABLE &lt;variable&gt;]
                  [OUTPUT_VARIABLE &lt;variable&gt;]
                  [ERROR_VARIABLE &lt;variable&gt;]
                  [INPUT_FILE &lt;file&gt;]
                  [OUTPUT_FILE &lt;file&gt;]
                  [ERROR_FILE &lt;file&gt;]
                  [OUTPUT_QUIET]
                  [ERROR_QUIET]
                  [OUTPUT_STRIP_TRAILING_WHITESPACE]
                  [ERROR_STRIP_TRAILING_WHITESPACE])
</programlisting>
</para>
<para>Runs the given sequence of one or more commands with the standard output of each process piped to the standard input of the next.  A single standard error pipe is used for all processes.  If WORKING_DIRECTORY is given the named directory will be set as the current working directory of the child processes.  If TIMEOUT is given the child processes will be terminated if they do not finish in the specified number of seconds (fractions are allowed).  If RESULT_VARIABLE is given the variable will be set to contain the result of running the processes.  This will be an integer return code from the last child or a string describing an error condition.  If OUTPUT_VARIABLE or ERROR_VARIABLE are given the variable named will be set with the contents of the standard output and standard error pipes respectively.  If the same variable is named for both pipes their output will be merged in the order produced.  If INPUT_FILE, OUTPUT_FILE, or ERROR_FILE is given the file named will be attached to the standard input of the first process, standard output of the last process, or standard error of all processes respectively.  If OUTPUT_QUIET or ERROR_QUIET is given then the standard output or standard error results will be quietly ignored.  If more than one OUTPUT_* or ERROR_* option is given for the same pipe the precedence is not specified.  If no OUTPUT_* or ERROR_* options are given the output will be shared with the corresponding pipes of the CMake process itself.
</para>
<para>The execute_process command is a newer more powerful version of exec_program, but the old command has been kept for compatibility.</para>
</sect2>
<sect2 id="cpack.command.file">
<title>file</title>
<abstract>
<para>File manipulation command.</para>
</abstract>
<para>
<programlisting>  file(WRITE filename "message to write"... )
  file(APPEND filename "message to write"... )
  file(READ filename variable [LIMIT numBytes] [OFFSET offset] [HEX])
  file(&lt;MD5|SHA1|SHA224|SHA256|SHA384|SHA512&gt; filename variable)
  file(STRINGS filename variable [LIMIT_COUNT num]
       [LIMIT_INPUT numBytes] [LIMIT_OUTPUT numBytes]
       [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]
       [NEWLINE_CONSUME] [REGEX regex]
       [NO_HEX_CONVERSION])
  file(GLOB variable [RELATIVE path] [globbing expressions]...)
  file(GLOB_RECURSE variable [RELATIVE path] 
       [FOLLOW_SYMLINKS] [globbing expressions]...)
  file(RENAME &lt;oldname&gt; &lt;newname&gt;)
  file(REMOVE [file1 ...])
  file(REMOVE_RECURSE [file1 ...])
  file(MAKE_DIRECTORY [directory1 directory2 ...])
  file(RELATIVE_PATH variable directory file)
  file(TO_CMAKE_PATH path result)
  file(TO_NATIVE_PATH path result)
  file(DOWNLOAD url file [INACTIVITY_TIMEOUT timeout]
       [TIMEOUT timeout] [STATUS status] [LOG log] [SHOW_PROGRESS]
       [EXPECTED_HASH ALGO=value] [EXPECTED_MD5 sum]
       [TLS_VERIFY on|off] [TLS_CAINFO file])
  file(UPLOAD filename url [INACTIVITY_TIMEOUT timeout]
       [TIMEOUT timeout] [STATUS status] [LOG log] [SHOW_PROGRESS])
  file(TIMESTAMP filename variable [&lt;format string&gt;] [UTC])
  file(GENERATE OUTPUT output_file
       &lt;INPUT input_file|CONTENT input_content&gt;
       [CONDITION expression])
</programlisting>
</para>
<para>WRITE will write a message into a file called 'filename'. It overwrites the file if it already exists, and creates the file if it does not exist. (If the file is a build input, use configure_file to update the file only when its content changes.)
</para>
<para>APPEND will write a message into a file same as WRITE, except it will append it to the end of the file
</para>
<para>READ will read the content of a file and store it into the variable. It will start at the given offset and read up to numBytes. If the argument HEX is given, the binary data will be converted to hexadecimal representation and this will be stored in the variable.
</para>
<para>MD5, SHA1, SHA224, SHA256, SHA384, and SHA512 will compute a cryptographic hash of the content of a file.
</para>
<para>STRINGS will parse a list of ASCII strings from a file and store it in a variable. Binary data in the file are ignored. Carriage return (CR) characters are ignored. It works also for Intel Hex and Motorola S-record files, which are automatically converted to binary format when reading them. Disable this using NO_HEX_CONVERSION.
</para>
<para>LIMIT_COUNT sets the maximum number of strings to return. LIMIT_INPUT sets the maximum number of bytes to read from the input file. LIMIT_OUTPUT sets the maximum number of bytes to store in the output variable. LENGTH_MINIMUM sets the minimum length of a string to return. Shorter strings are ignored. LENGTH_MAXIMUM sets the maximum length of a string to return.  Longer strings are split into strings no longer than the maximum length. NEWLINE_CONSUME allows newlines to be included in strings instead of terminating them.
</para>
<para>REGEX specifies a regular expression that a string must match to be returned. Typical usage 
</para>
<para>
<programlisting>  file(STRINGS myfile.txt myfile)
</programlisting>
</para>
<para>stores a list in the variable "myfile" in which each item is a line from the input file.
</para>
<para>GLOB will generate a list of all files that match the globbing expressions and store it into the variable. Globbing expressions are similar to regular expressions, but much simpler. If RELATIVE flag is specified for an expression, the results will be returned as a relative path to the given path.  (We do not recommend using GLOB to collect a list of source files from your source tree.  If no CMakeLists.txt file changes when a source is added or removed then the generated build system cannot know when to ask CMake to regenerate.)
</para>
<para>Examples of globbing expressions include:
</para>
<para>
<programlisting>   *.cxx      - match all files with extension cxx
   *.vt?      - match all files with extension vta,...,vtz
   f[3-5].txt - match files f3.txt, f4.txt, f5.txt
</programlisting>
</para>
<para>GLOB_RECURSE will generate a list similar to the regular GLOB, except it will traverse all the subdirectories of the matched directory and match the files. Subdirectories that are symlinks are only traversed if FOLLOW_SYMLINKS is given or cmake policy CMP0009 is not set to NEW. See cmake --help-policy CMP0009 for more information.
</para>
<para>Examples of recursive globbing include:
</para>
<para>
<programlisting>   /dir/*.py  - match all python files in /dir and subdirectories
</programlisting>
</para>
<para>MAKE_DIRECTORY will create the given directories, also if their parent directories don't exist yet
</para>
<para>RENAME moves a file or directory within a filesystem, replacing the destination atomically.
</para>
<para>REMOVE will remove the given files, also in subdirectories
</para>
<para>REMOVE_RECURSE will remove the given files and directories, also non-empty directories
</para>
<para>RELATIVE_PATH will determine relative path from directory to the given file.
</para>
<para>TO_CMAKE_PATH will convert path into a cmake style path with unix /.  The input can be a single path or a system path like "$ENV{PATH}".  Note the double quotes around the ENV call TO_CMAKE_PATH only takes  one argument. This command will also convert the native list delimiters for a list of paths like the PATH environment variable.
</para>
<para>TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from  a cmake style path into the native path style \ for windows and / for UNIX.
</para>
<para>DOWNLOAD will download the given URL to the given file. If LOG var is specified a log of the download will be put in var. If STATUS var is specified the status of the operation will be put in var. The status is returned in a list of length 2. The first element is the numeric return value for the operation, and the second element is a string value for the error. A 0 numeric error means no error in the operation. If TIMEOUT time is specified, the operation will timeout after time seconds, time should be specified as an integer. The INACTIVITY_TIMEOUT specifies an integer number of seconds of inactivity after which the operation should terminate. If EXPECTED_HASH ALGO=value is specified, the operation will verify that the downloaded file's actual hash matches the expected value, where ALGO is one of MD5, SHA1, SHA224, SHA256, SHA384, or SHA512.  If it does not match, the operation fails with an error. ("EXPECTED_MD5 sum" is short-hand for "EXPECTED_HASH MD5=sum".) If SHOW_PROGRESS is specified, progress information will be printed as status messages until the operation is complete. For https URLs CMake must be built with OpenSSL.  TLS/SSL certificates are not checked by default.  Set TLS_VERIFY to ON to check certificates and/or use EXPECTED_HASH to verify downloaded content.  Set TLS_CAINFO to specify a custom Certificate Authority file.  If either TLS option is not given CMake will check variables CMAKE_TLS_VERIFY and CMAKE_TLS_CAINFO, respectively.
</para>
<para>UPLOAD will upload the given file to the given URL. If LOG var is specified a log of the upload will be put in var. If STATUS var is specified the status of the operation will be put in var. The status is returned in a list of length 2. The first element is the numeric return value for the operation, and the second element is a string value for the error. A 0 numeric error means no error in the operation. If TIMEOUT time is specified, the operation will timeout after time seconds, time should be specified as an integer. The INACTIVITY_TIMEOUT specifies an integer number of seconds of inactivity after which the operation should terminate. If SHOW_PROGRESS is specified, progress information will be printed as status messages until the operation is complete.
</para>
<para>TIMESTAMP will write a string representation of the modification time of filename to variable.
</para>
<para>Should the command be unable to obtain a timestamp variable will be set to the empty string "".
</para>
<para>See documentation of the string TIMESTAMP sub-command for more details.
</para>
<para>The file() command also provides COPY and INSTALL signatures:
</para>
<para>
<programlisting>  file(&lt;COPY|INSTALL&gt; files... DESTINATION &lt;dir&gt;
       [FILE_PERMISSIONS permissions...]
       [DIRECTORY_PERMISSIONS permissions...]
       [NO_SOURCE_PERMISSIONS] [USE_SOURCE_PERMISSIONS]
       [FILES_MATCHING]
       [[PATTERN &lt;pattern&gt; | REGEX &lt;regex&gt;]
        [EXCLUDE] [PERMISSIONS permissions...]] [...])
</programlisting>
</para>
<para>The COPY signature copies files, directories, and symlinks to a destination folder.  Relative input paths are evaluated with respect to the current source directory, and a relative destination is evaluated with respect to the current build directory.  Copying preserves input file timestamps, and optimizes out a file if it exists at the destination with the same timestamp.  Copying preserves input permissions unless explicit permissions or NO_SOURCE_PERMISSIONS are given (default is USE_SOURCE_PERMISSIONS).  See the install(DIRECTORY) command for documentation of permissions, PATTERN, REGEX, and EXCLUDE options.  
</para>
<para>The INSTALL signature differs slightly from COPY: it prints status messages, and NO_SOURCE_PERMISSIONS is default.  Installation scripts generated by the install() command use this signature (with some undocumented options for internal use).
</para>
<para>GENERATE will write an &lt;output_file&gt; with content from an &lt;input_file&gt;, or from &lt;input_content&gt;.  The output is generated conditionally based on the content of the &lt;condition&gt;.  The file is written at CMake generate-time and the input may contain generator expressions.  The &lt;condition&gt;, &lt;output_file&gt; and &lt;input_file&gt; may also contain generator expressions.  The &lt;condition&gt; must evaluate to either '0' or '1'.  The &lt;output_file&gt; must evaluate to a unique name among all configurations and among all invocations of file(GENERATE).</para>
</sect2>
<sect2 id="cpack.command.find_file">
<title>find_file</title>
<abstract>
<para>Find the full path to a file.</para>
</abstract>
<para>
<programlisting>   find_file(&lt;VAR&gt; name1 [path1 path2 ...])
</programlisting>
</para>
<para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_file(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para>
<para>
<programlisting>   find_file(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</programlisting>
</para>
<para>This command is used to find a full path to named file. A cache entry named by &lt;VAR&gt; is created to store the result of this command.  If the full path to a file is found the result is stored in the variable and the search will not be repeated unless the variable is cleared.  If nothing is found, the result will be &lt;VAR&gt;-NOTFOUND, and the search will be attempted again the next time find_file is invoked with the same variable.  The name of the full path to a file that is searched for is specified by the names listed after the NAMES argument.   Additional search locations can be specified after the PATHS argument.  If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths.  For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache.  PATH_SUFFIXES specifies additional subdirectories to check below each search path.
</para>
<para>If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
</para>
<para>1. Search paths specified in cmake-specific cache variables.  These are intended to be used on the command line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/include/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</programlisting>
</para>
<para>2. Search paths specified in cmake-specific environment variables.  These are intended to be set in the user's shell configuration.  This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/include/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</programlisting>
</para>
<para>3. Search the paths specified by the HINTS option.  These should be paths computed by system introspection, such as a hint provided by the location of another item already found.  Hard-coded guesses should be specified with the PATHS option.
</para>
<para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para>
<para>
<programlisting>   PATH
   INCLUDE
</programlisting>
</para>
<para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/include/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_INCLUDE_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
</programlisting>
</para>
<para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para>
<para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find frameworks before standard
              libraries or headers. This is the default on Darwin.
   "LAST"   - Try to find frameworks after standard
              libraries or headers.
   "ONLY"   - Only try to find frameworks.
   "NEVER" - Never try to find frameworks.
</programlisting>
</para>
<para>On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find application bundles before standard
              programs. This is the default on Darwin.
   "LAST"   - Try to find application bundles after standard
              programs.
   "ONLY"   - Only try to find application bundles.
   "NEVER" - Never try to find application bundles.
</programlisting>
</para>
<para>The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.  This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
</para>
<para>The default search order is designed to be most-specific to least-specific for common use cases.  Projects may override the order by simply calling the command multiple times and using the NO_* options:
</para>
<para>
<programlisting>   find_file(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_file(&lt;VAR&gt; NAMES name)
</programlisting>
</para>
<para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.</para>
</sect2>
<sect2 id="cpack.command.find_library">
<title>find_library</title>
<abstract>
<para>Find a library.</para>
</abstract>
<para>
<programlisting>   find_library(&lt;VAR&gt; name1 [path1 path2 ...])
</programlisting>
</para>
<para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_library(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para>
<para>
<programlisting>   find_library(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...] [NAMES_PER_DIR]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</programlisting>
</para>
<para>This command is used to find a library. A cache entry named by &lt;VAR&gt; is created to store the result of this command.  If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared.  If nothing is found, the result will be &lt;VAR&gt;-NOTFOUND, and the search will be attempted again the next time find_library is invoked with the same variable.  The name of the library that is searched for is specified by the names listed after the NAMES argument.   Additional search locations can be specified after the PATHS argument.  If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths.  For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache.  PATH_SUFFIXES specifies additional subdirectories to check below each search path.
</para>
<para>If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
</para>
<para>1. Search paths specified in cmake-specific cache variables.  These are intended to be used on the command line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/lib/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_LIBRARY_PATH
   CMAKE_FRAMEWORK_PATH
</programlisting>
</para>
<para>2. Search paths specified in cmake-specific environment variables.  These are intended to be set in the user's shell configuration.  This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/lib/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_LIBRARY_PATH
   CMAKE_FRAMEWORK_PATH
</programlisting>
</para>
<para>3. Search the paths specified by the HINTS option.  These should be paths computed by system introspection, such as a hint provided by the location of another item already found.  Hard-coded guesses should be specified with the PATHS option.
</para>
<para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para>
<para>
<programlisting>   PATH
   LIB
</programlisting>
</para>
<para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/lib/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_LIBRARY_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
</programlisting>
</para>
<para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para>
<para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find frameworks before standard
              libraries or headers. This is the default on Darwin.
   "LAST"   - Try to find frameworks after standard
              libraries or headers.
   "ONLY"   - Only try to find frameworks.
   "NEVER" - Never try to find frameworks.
</programlisting>
</para>
<para>On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find application bundles before standard
              programs. This is the default on Darwin.
   "LAST"   - Try to find application bundles after standard
              programs.
   "ONLY"   - Only try to find application bundles.
   "NEVER" - Never try to find application bundles.
</programlisting>
</para>
<para>The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_LIBRARY.  This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
</para>
<para>The default search order is designed to be most-specific to least-specific for common use cases.  Projects may override the order by simply calling the command multiple times and using the NO_* options:
</para>
<para>
<programlisting>   find_library(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_library(&lt;VAR&gt; NAMES name)
</programlisting>
</para>
<para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</para>
<para>When more than one value is given to the NAMES option this command by default will consider one name at a time and search every directory for it.  The NAMES_PER_DIR option tells this command to consider one directory at a time and search for all names in it.
</para>
<para>If the library found is a framework, then VAR will be set to the full path to the framework &lt;fullPath&gt;/A.framework. When a full path to a framework is used as a library, CMake will use a -framework A, and a -F&lt;fullPath&gt; to link the framework to the target.
</para>
<para>If the global property FIND_LIBRARY_USE_LIB64_PATHS is set all search paths will be tested as normal, with "64/" appended, and with all matches of "lib/" replaced with "lib64/". This property is automatically set for the platforms that are known to need it if at least one of the languages supported by the PROJECT command is enabled.</para>
</sect2>
<sect2 id="cpack.command.find_package">
<title>find_package</title>
<abstract>
<para>Load settings for an external project.</para>
</abstract>
<para>
<programlisting>  find_package(&lt;package&gt; [version] [EXACT] [QUIET] [MODULE]
               [REQUIRED] [[COMPONENTS] [components...]]
               [OPTIONAL_COMPONENTS components...]
               [NO_POLICY_SCOPE])
</programlisting>
</para>
<para>Finds and loads settings from an external project.  &lt;package&gt;_FOUND will be set to indicate whether the package was found.  When the package is found package-specific information is provided through variables and imported targets documented by the package itself.  The QUIET option disables messages if the package cannot be found.  The MODULE option disables the second signature documented below.  The REQUIRED option stops processing with an error message if the package cannot be found.
</para>
<para>A package-specific list of required components may be listed after the COMPONENTS option (or after the REQUIRED option if present).  Additional optional components may be listed after OPTIONAL_COMPONENTS.  Available components and their influence on whether a package is considered to be found are defined by the target package.
</para>
<para>The [version] argument requests a version with which the package found should be compatible (format is major[.minor[.patch[.tweak]]]).  The EXACT option requests that the version be matched exactly.  If no [version] and/or component list is given to a recursive invocation inside a find-module, the corresponding arguments are forwarded automatically from the outer call (including the EXACT flag for [version]).  Version support is currently provided only on a package-by-package basis (details below).
</para>
<para>User code should generally look for packages using the above simple signature.  The remainder of this command documentation specifies the full command signature and details of the search process.  Project maintainers wishing to provide a package to be found by this command are encouraged to read on.
</para>
<para>The command has two modes by which it searches for packages: "Module" mode and "Config" mode.  Module mode is available when the command is invoked with the above reduced signature.  CMake searches for a file called "Find&lt;package&gt;.cmake" in the CMAKE_MODULE_PATH followed by the CMake installation.  If the file is found, it is read and processed by CMake.  It is responsible for finding the package, checking the version, and producing any needed messages.  Many find-modules provide limited or no support for versioning; check the module documentation.  If no module is found and the MODULE option is not given the command proceeds to Config mode.
</para>
<para>The complete Config mode command signature is:
</para>
<para>
<programlisting>  find_package(&lt;package&gt; [version] [EXACT] [QUIET]
               [REQUIRED] [[COMPONENTS] [components...]]
               [CONFIG|NO_MODULE]
               [NO_POLICY_SCOPE]
               [NAMES name1 [name2 ...]]
               [CONFIGS config1 [config2 ...]]
               [HINTS path1 [path2 ... ]]
               [PATHS path1 [path2 ... ]]
               [PATH_SUFFIXES suffix1 [suffix2 ...]]
               [NO_DEFAULT_PATH]
               [NO_CMAKE_ENVIRONMENT_PATH]
               [NO_CMAKE_PATH]
               [NO_SYSTEM_ENVIRONMENT_PATH]
               [NO_CMAKE_PACKAGE_REGISTRY]
               [NO_CMAKE_BUILDS_PATH]
               [NO_CMAKE_SYSTEM_PATH]
               [NO_CMAKE_SYSTEM_PACKAGE_REGISTRY]
               [CMAKE_FIND_ROOT_PATH_BOTH |
                ONLY_CMAKE_FIND_ROOT_PATH |
                NO_CMAKE_FIND_ROOT_PATH])
</programlisting>
</para>
<para>The CONFIG option may be used to skip Module mode explicitly and switch to Config mode.  It is synonymous to using NO_MODULE.  Config mode is also implied by use of options not specified in the reduced signature.  
</para>
<para>Config mode attempts to locate a configuration file provided by the package to be found.  A cache entry called &lt;package&gt;_DIR is created to hold the directory containing the file.  By default the command searches for a package with the name &lt;package&gt;.  If the NAMES option is given the names following it are used instead of &lt;package&gt;.  The command searches for a file called "&lt;name&gt;Config.cmake" or "&lt;lower-case-name&gt;-config.cmake" for each name specified.  A replacement set of possible configuration file names may be given using the CONFIGS option.  The search procedure is specified below.  Once found, the configuration file is read and processed by CMake.  Since the file is provided by the package it already knows the location of package contents.  The full path to the configuration file is stored in the cmake variable &lt;package&gt;_CONFIG.
</para>
<para>All configuration files which have been considered by CMake while searching for an installation of the package with an appropriate version are stored in the cmake variable &lt;package&gt;_CONSIDERED_CONFIGS, the associated versions in &lt;package&gt;_CONSIDERED_VERSIONS. 
</para>
<para>If the package configuration file cannot be found CMake will generate an error describing the problem unless the QUIET argument is specified.  If REQUIRED is specified and the package is not found a fatal error is generated and the configure step stops executing.  If &lt;package&gt;_DIR has been set to a directory not containing a configuration file CMake will ignore it and search from scratch.
</para>
<para>When the [version] argument is given Config mode will only find a version of the package that claims compatibility with the requested version (format is major[.minor[.patch[.tweak]]]).  If the EXACT option is given only a version of the package claiming an exact match of the requested version may be found.  CMake does not establish any convention for the meaning of version numbers.  Package version numbers are checked by "version" files provided by the packages themselves.  For a candidate package configuration file "&lt;config-file&gt;.cmake" the corresponding version file is located next to it and named either "&lt;config-file&gt;-version.cmake" or "&lt;config-file&gt;Version.cmake".  If no such version file is available then the configuration file is assumed to not be compatible with any requested version.  A basic version file containing generic version matching code can be created using the macro write_basic_package_version_file(), see its documentation for more details.  When a version file is found it is loaded to check the requested version number.  The version file is loaded in a nested scope in which the following variables have been defined:
</para>
<para>
<programlisting>  PACKAGE_FIND_NAME          = the &lt;package&gt; name
  PACKAGE_FIND_VERSION       = full requested version string
  PACKAGE_FIND_VERSION_MAJOR = major version if requested, else 0
  PACKAGE_FIND_VERSION_MINOR = minor version if requested, else 0
  PACKAGE_FIND_VERSION_PATCH = patch version if requested, else 0
  PACKAGE_FIND_VERSION_TWEAK = tweak version if requested, else 0
  PACKAGE_FIND_VERSION_COUNT = number of version components, 0 to 4
</programlisting>
</para>
<para>The version file checks whether it satisfies the requested version and sets these variables:
</para>
<para>
<programlisting>  PACKAGE_VERSION            = full provided version string
  PACKAGE_VERSION_EXACT      = true if version is exact match
  PACKAGE_VERSION_COMPATIBLE = true if version is compatible
  PACKAGE_VERSION_UNSUITABLE = true if unsuitable as any version
</programlisting>
</para>
<para>These variables are checked by the find_package command to determine whether the configuration file provides an acceptable version.  They are not available after the find_package call returns.  If the version is acceptable the following variables are set:
</para>
<para>
<programlisting>  &lt;package&gt;_VERSION       = full provided version string
  &lt;package&gt;_VERSION_MAJOR = major version if provided, else 0
  &lt;package&gt;_VERSION_MINOR = minor version if provided, else 0
  &lt;package&gt;_VERSION_PATCH = patch version if provided, else 0
  &lt;package&gt;_VERSION_TWEAK = tweak version if provided, else 0
  &lt;package&gt;_VERSION_COUNT = number of version components, 0 to 4
</programlisting>
</para>
<para>and the corresponding package configuration file is loaded.  When multiple package configuration files are available whose version files claim compatibility with the version requested it is unspecified which one is chosen.  No attempt is made to choose a highest or closest version number.
</para>
<para>Config mode provides an elaborate interface and search procedure.  Much of the interface is provided for completeness and for use internally by find-modules loaded by Module mode.  Most user code should simply call
</para>
<para>
<programlisting>  find_package(&lt;package&gt; [major[.minor]] [EXACT] [REQUIRED|QUIET])
</programlisting>
</para>
<para>in order to find a package.  Package maintainers providing CMake package configuration files are encouraged to name and install them such that the procedure outlined below will find them without requiring use of additional options.
</para>
<para>CMake constructs a set of possible installation prefixes for the package.  Under each prefix several directories are searched for a configuration file.  The tables below show the directories searched.  Each entry is meant for installation trees following Windows (W), UNIX (U), or Apple (A) conventions.
</para>
<para>
<programlisting>  &lt;prefix&gt;/                                               (W)
  &lt;prefix&gt;/(cmake|CMake)/                                 (W)
  &lt;prefix&gt;/&lt;name&gt;*/                                       (W)
  &lt;prefix&gt;/&lt;name&gt;*/(cmake|CMake)/                         (W)
  &lt;prefix&gt;/(lib/&lt;arch&gt;|lib|share)/cmake/&lt;name&gt;*/          (U)
  &lt;prefix&gt;/(lib/&lt;arch&gt;|lib|share)/&lt;name&gt;*/                (U)
  &lt;prefix&gt;/(lib/&lt;arch&gt;|lib|share)/&lt;name&gt;*/(cmake|CMake)/  (U)
</programlisting>
</para>
<para>On systems supporting OS X Frameworks and Application Bundles the following directories are searched for frameworks or bundles containing a configuration file:
</para>
<para>
<programlisting>  &lt;prefix&gt;/&lt;name&gt;.framework/Resources/                    (A)
  &lt;prefix&gt;/&lt;name&gt;.framework/Resources/CMake/              (A)
  &lt;prefix&gt;/&lt;name&gt;.framework/Versions/*/Resources/         (A)
  &lt;prefix&gt;/&lt;name&gt;.framework/Versions/*/Resources/CMake/   (A)
  &lt;prefix&gt;/&lt;name&gt;.app/Contents/Resources/                 (A)
  &lt;prefix&gt;/&lt;name&gt;.app/Contents/Resources/CMake/           (A)
</programlisting>
</para>
<para>In all cases the &lt;name&gt; is treated as case-insensitive and corresponds to any of the names specified (&lt;package&gt; or names given by NAMES).  Paths with lib/&lt;arch&gt; are enabled if CMAKE_LIBRARY_ARCHITECTURE is set.  If PATH_SUFFIXES is specified the suffixes are appended to each (W) or (U) directory entry one-by-one.
</para>
<para>This set of directories is intended to work in cooperation with projects that provide configuration files in their installation trees.  Directories above marked with (W) are intended for installations on Windows where the prefix may point at the top of an application's installation directory.  Those marked with (U) are intended for installations on UNIX platforms where the prefix is shared by multiple packages.  This is merely a convention, so all (W) and (U) directories are still searched on all platforms.  Directories marked with (A) are intended for installations on Apple platforms.  The cmake variables CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE determine the order of preference as specified below.
</para>
<para>The set of installation prefixes is constructed using the following steps.  If NO_DEFAULT_PATH is specified all NO_* options are enabled.
</para>
<para>1. Search paths specified in cmake-specific cache variables.  These are intended to be used on the command line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
</para>
<para>
<programlisting>   CMAKE_PREFIX_PATH
   CMAKE_FRAMEWORK_PATH
   CMAKE_APPBUNDLE_PATH
</programlisting>
</para>
<para>2. Search paths specified in cmake-specific environment variables.  These are intended to be set in the user's shell configuration.  This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
</para>
<para>
<programlisting>   &lt;package&gt;_DIR
   CMAKE_PREFIX_PATH
   CMAKE_FRAMEWORK_PATH
   CMAKE_APPBUNDLE_PATH
</programlisting>
</para>
<para>3. Search paths specified by the HINTS option.  These should be paths computed by system introspection, such as a hint provided by the location of another item already found.  Hard-coded guesses should be specified with the PATHS option.
</para>
<para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed.  Path entries ending in "/bin" or "/sbin" are automatically converted to their parent directories.
</para>
<para>
<programlisting>   PATH
</programlisting>
</para>
<para>5. Search project build trees recently configured in a CMake GUI.  This can be skipped if NO_CMAKE_BUILDS_PATH is passed.  It is intended for the case when a user is building multiple dependent projects one after another.
</para>
<para>6. Search paths stored in the CMake user package registry.  This can be skipped if NO_CMAKE_PACKAGE_REGISTRY is passed.  On Windows a &lt;package&gt; may appear under registry key
</para>
<para>
<programlisting>  HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\&lt;package&gt;
</programlisting>
</para>
<para>as a REG_SZ value, with arbitrary name, that specifies the directory containing the package configuration file.  On UNIX platforms a &lt;package&gt; may appear under the directory
</para>
<para>
<programlisting>  ~/.cmake/packages/&lt;package&gt;
</programlisting>
</para>
<para>as a file, with arbitrary name, whose content specifies the directory containing the package configuration file.  See the export(PACKAGE) command to create user package registry entries for project build trees.
</para>
<para>7. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para>
<para>
<programlisting>   CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
   CMAKE_SYSTEM_APPBUNDLE_PATH
</programlisting>
</para>
<para>8. Search paths stored in the CMake system package registry.  This can be skipped if NO_CMAKE_SYSTEM_PACKAGE_REGISTRY is passed.  On Windows a &lt;package&gt; may appear under registry key
</para>
<para>
<programlisting>  HKEY_LOCAL_MACHINE\Software\Kitware\CMake\Packages\&lt;package&gt;
</programlisting>
</para>
<para>as a REG_SZ value, with arbitrary name, that specifies the directory containing the package configuration file.  There is no system package registry on non-Windows platforms.
</para>
<para>9. Search paths specified by the PATHS option.  These are typically hard-coded guesses.
</para>
<para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find frameworks before standard
              libraries or headers. This is the default on Darwin.
   "LAST"   - Try to find frameworks after standard
              libraries or headers.
   "ONLY"   - Only try to find frameworks.
   "NEVER" - Never try to find frameworks.
</programlisting>
</para>
<para>On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find application bundles before standard
              programs. This is the default on Darwin.
   "LAST"   - Try to find application bundles after standard
              programs.
   "ONLY"   - Only try to find application bundles.
   "NEVER" - Never try to find application bundles.
</programlisting>
</para>
<para>The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PACKAGE.  This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
</para>
<para>The default search order is designed to be most-specific to least-specific for common use cases.  Projects may override the order by simply calling the command multiple times and using the NO_* options:
</para>
<para>
<programlisting>   find_package(&lt;package&gt; PATHS paths... NO_DEFAULT_PATH)
   find_package(&lt;package&gt;)
</programlisting>
</para>
<para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</para>
<para>Every non-REQUIRED find_package() call can be disabled by setting the variable CMAKE_DISABLE_FIND_PACKAGE_&lt;package&gt; to TRUE. See the documentation for the CMAKE_DISABLE_FIND_PACKAGE_&lt;package&gt; variable for more information.
</para>
<para>When loading a find module or package configuration file find_package defines variables to provide information about the call arguments (and restores their original state before returning):
</para>
<para>
<programlisting> &lt;package&gt;_FIND_REQUIRED      = true if REQUIRED option was given
 &lt;package&gt;_FIND_QUIETLY       = true if QUIET option was given
 &lt;package&gt;_FIND_VERSION       = full requested version string
 &lt;package&gt;_FIND_VERSION_MAJOR = major version if requested, else 0
 &lt;package&gt;_FIND_VERSION_MINOR = minor version if requested, else 0
 &lt;package&gt;_FIND_VERSION_PATCH = patch version if requested, else 0
 &lt;package&gt;_FIND_VERSION_TWEAK = tweak version if requested, else 0
 &lt;package&gt;_FIND_VERSION_COUNT = number of version components, 0 to 4
 &lt;package&gt;_FIND_VERSION_EXACT = true if EXACT option was given
 &lt;package&gt;_FIND_COMPONENTS    = list of requested components
 &lt;package&gt;_FIND_REQUIRED_&lt;c&gt;  = true if component &lt;c&gt; is required
                                false if component &lt;c&gt; is optional
</programlisting>
</para>
<para>In Module mode the loaded find module is responsible to honor the request detailed by these variables; see the find module for details.  In Config mode find_package handles REQUIRED, QUIET, and version options automatically but leaves it to the package configuration file to handle components in a way that makes sense for the package.  The package configuration file may set &lt;package&gt;_FOUND to false to tell find_package that component requirements are not satisfied.
</para>
<para>See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.</para>
</sect2>
<sect2 id="cpack.command.find_path">
<title>find_path</title>
<abstract>
<para>Find the directory containing a file.</para>
</abstract>
<para>
<programlisting>   find_path(&lt;VAR&gt; name1 [path1 path2 ...])
</programlisting>
</para>
<para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_path(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para>
<para>
<programlisting>   find_path(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</programlisting>
</para>
<para>This command is used to find a directory containing the named file. A cache entry named by &lt;VAR&gt; is created to store the result of this command.  If the file in a directory is found the result is stored in the variable and the search will not be repeated unless the variable is cleared.  If nothing is found, the result will be &lt;VAR&gt;-NOTFOUND, and the search will be attempted again the next time find_path is invoked with the same variable.  The name of the file in a directory that is searched for is specified by the names listed after the NAMES argument.   Additional search locations can be specified after the PATHS argument.  If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths.  For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache.  PATH_SUFFIXES specifies additional subdirectories to check below each search path.
</para>
<para>If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
</para>
<para>1. Search paths specified in cmake-specific cache variables.  These are intended to be used on the command line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/include/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</programlisting>
</para>
<para>2. Search paths specified in cmake-specific environment variables.  These are intended to be set in the user's shell configuration.  This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/include/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_INCLUDE_PATH
   CMAKE_FRAMEWORK_PATH
</programlisting>
</para>
<para>3. Search the paths specified by the HINTS option.  These should be paths computed by system introspection, such as a hint provided by the location of another item already found.  Hard-coded guesses should be specified with the PATHS option.
</para>
<para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para>
<para>
<programlisting>   PATH
   INCLUDE
</programlisting>
</para>
<para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/include/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and
   &lt;prefix&gt;/include for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_INCLUDE_PATH
   CMAKE_SYSTEM_FRAMEWORK_PATH
</programlisting>
</para>
<para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para>
<para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find frameworks before standard
              libraries or headers. This is the default on Darwin.
   "LAST"   - Try to find frameworks after standard
              libraries or headers.
   "ONLY"   - Only try to find frameworks.
   "NEVER" - Never try to find frameworks.
</programlisting>
</para>
<para>On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find application bundles before standard
              programs. This is the default on Darwin.
   "LAST"   - Try to find application bundles after standard
              programs.
   "ONLY"   - Only try to find application bundles.
   "NEVER" - Never try to find application bundles.
</programlisting>
</para>
<para>The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_INCLUDE.  This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
</para>
<para>The default search order is designed to be most-specific to least-specific for common use cases.  Projects may override the order by simply calling the command multiple times and using the NO_* options:
</para>
<para>
<programlisting>   find_path(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_path(&lt;VAR&gt; NAMES name)
</programlisting>
</para>
<para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
</para>
<para>When searching for frameworks, if the file is specified as A/b.h, then the framework search will look for A.framework/Headers/b.h. If that is found the path will be set to the path to the framework. CMake will convert this to the correct -F option to include the file. </para>
</sect2>
<sect2 id="cpack.command.find_program">
<title>find_program</title>
<abstract>
<para>Find an executable program.</para>
</abstract>
<para>
<programlisting>   find_program(&lt;VAR&gt; name1 [path1 path2 ...])
</programlisting>
</para>
<para>This is the short-hand signature for the command that is sufficient in many cases.  It is the same as find_program(&lt;VAR&gt; name1 [PATHS path1 path2 ...])
</para>
<para>
<programlisting>   find_program(
             &lt;VAR&gt;
             name | NAMES name1 [name2 ...]
             [HINTS path1 [path2 ... ENV var]]
             [PATHS path1 [path2 ... ENV var]]
             [PATH_SUFFIXES suffix1 [suffix2 ...]]
             [DOC "cache documentation string"]
             [NO_DEFAULT_PATH]
             [NO_CMAKE_ENVIRONMENT_PATH]
             [NO_CMAKE_PATH]
             [NO_SYSTEM_ENVIRONMENT_PATH]
             [NO_CMAKE_SYSTEM_PATH]
             [CMAKE_FIND_ROOT_PATH_BOTH |
              ONLY_CMAKE_FIND_ROOT_PATH |
              NO_CMAKE_FIND_ROOT_PATH]
            )
</programlisting>
</para>
<para>This command is used to find a program. A cache entry named by &lt;VAR&gt; is created to store the result of this command.  If the program is found the result is stored in the variable and the search will not be repeated unless the variable is cleared.  If nothing is found, the result will be &lt;VAR&gt;-NOTFOUND, and the search will be attempted again the next time find_program is invoked with the same variable.  The name of the program that is searched for is specified by the names listed after the NAMES argument.   Additional search locations can be specified after the PATHS argument.  If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths.  For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache.  PATH_SUFFIXES specifies additional subdirectories to check below each search path.
</para>
<para>If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:
</para>
<para>1. Search paths specified in cmake-specific cache variables.  These are intended to be used on the command line with a -DVAR=value.  This can be skipped if NO_CMAKE_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_PROGRAM_PATH
   CMAKE_APPBUNDLE_PATH
</programlisting>
</para>
<para>2. Search paths specified in cmake-specific environment variables.  These are intended to be set in the user's shell configuration.  This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
   CMAKE_PROGRAM_PATH
   CMAKE_APPBUNDLE_PATH
</programlisting>
</para>
<para>3. Search the paths specified by the HINTS option.  These should be paths computed by system introspection, such as a hint provided by the location of another item already found.  Hard-coded guesses should be specified with the PATHS option.
</para>
<para>4. Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.
</para>
<para>
<programlisting>   PATH
   
</programlisting>
</para>
<para>5. Search cmake variables defined in the Platform files for the current system.  This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.
</para>
<para>
<programlisting>   &lt;prefix&gt;/[s]bin for each &lt;prefix&gt; in CMAKE_SYSTEM_PREFIX_PATH
   CMAKE_SYSTEM_PROGRAM_PATH
   CMAKE_SYSTEM_APPBUNDLE_PATH
</programlisting>
</para>
<para>6. Search the paths specified by the PATHS option or in the short-hand version of the command.  These are typically hard-coded guesses.
</para>
<para>On Darwin or systems supporting OS X Frameworks, the cmake variable    CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find frameworks before standard
              libraries or headers. This is the default on Darwin.
   "LAST"   - Try to find frameworks after standard
              libraries or headers.
   "ONLY"   - Only try to find frameworks.
   "NEVER" - Never try to find frameworks.
</programlisting>
</para>
<para>On Darwin or systems supporting OS X Application Bundles, the cmake variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the following:
</para>
<para>
<programlisting>   "FIRST"  - Try to find application bundles before standard
              programs. This is the default on Darwin.
   "LAST"   - Try to find application bundles after standard
              programs.
   "ONLY"   - Only try to find application bundles.
   "NEVER" - Never try to find application bundles.
</programlisting>
</para>
<para>The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more directories to be prepended to all other search directories. This effectively "re-roots" the entire search under given locations. By default it is empty. It is especially useful when cross-compiling to point to the root directory of the target environment and CMake will search there too. By default at first the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted directories will be searched. The default behavior can be adjusted by setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.  This behavior can be manually overridden on a per-call basis. By using CMAKE_FIND_ROOT_PATH_BOTH the search order will be as described above. If NO_CMAKE_FIND_ROOT_PATH is used then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH is used then only the re-rooted directories will be searched.
</para>
<para>The default search order is designed to be most-specific to least-specific for common use cases.  Projects may override the order by simply calling the command multiple times and using the NO_* options:
</para>
<para>
<programlisting>   find_program(&lt;VAR&gt; NAMES name PATHS paths... NO_DEFAULT_PATH)
   find_program(&lt;VAR&gt; NAMES name)
</programlisting>
</para>
<para>Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.</para>
</sect2>
<sect2 id="cpack.command.foreach">
<title>foreach</title>
<abstract>
<para>Evaluate a group of commands for each value in a list.</para>
</abstract>
<para>
<programlisting>  foreach(loop_var arg1 arg2 ...)
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endforeach(loop_var)
</programlisting>
</para>
<para>All commands between foreach and the matching endforeach are recorded without being invoked.  Once the endforeach is evaluated, the recorded list of commands is invoked once for each argument listed in the original foreach command.  Before each iteration of the loop "${loop_var}" will be set as a variable with the current value in the list.
</para>
<para>
<programlisting>  foreach(loop_var RANGE total)
  foreach(loop_var RANGE start stop [step])
</programlisting>
</para>
<para>Foreach can also iterate over a generated range of numbers. There are three types of this iteration:
</para>
<para>* When specifying single number, the range will have elements 0 to "total".
</para>
<para>* When specifying two numbers, the range will have elements from the first number to the second number.
</para>
<para>* The third optional number is the increment used to iterate from the first number to the second number.
</para>
<para>
<programlisting>  foreach(loop_var IN [LISTS [list1 [...]]]
                      [ITEMS [item1 [...]]])
</programlisting>
</para>
<para>Iterates over a precise list of items.  The LISTS option names list-valued variables to be traversed, including empty elements (an empty string is a zero-length list).  The ITEMS option ends argument parsing and includes all arguments following it in the iteration.</para>
</sect2>
<sect2 id="cpack.command.function">
<title>function</title>
<abstract>
<para>Start recording a function for later invocation as a command.</para>
</abstract>
<para>
<programlisting>  function(&lt;name&gt; [arg1 [arg2 [arg3 ...]]])
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endfunction(&lt;name&gt;)
</programlisting>
</para>
<para>Define a function named &lt;name&gt; that takes arguments named arg1 arg2 arg3 (...).  Commands listed after function, but before the matching endfunction, are not invoked until the function is invoked.  When it is invoked, the commands recorded in the function are first modified by replacing formal parameters (${arg1}) with the arguments passed, and then invoked as normal commands. In addition to referencing the formal parameters you can reference the variable ARGC which will be set to the number of arguments passed into the function as well as ARGV0 ARGV1 ARGV2 ... which will have the actual values of the arguments passed in. This facilitates creating functions with optional arguments. Additionally ARGV holds the list of all arguments given to the function and ARGN holds the list of arguments past the last expected argument.
</para>
<para>A function opens a new scope: see set(var PARENT_SCOPE) for details.
</para>
<para>See the cmake_policy() command documentation for the behavior of policies inside functions.</para>
</sect2>
<sect2 id="cpack.command.get_cmake_property">
<title>get_cmake_property</title>
<abstract>
<para>Get a property of the CMake instance.</para>
</abstract>
<para>
<programlisting>  get_cmake_property(VAR property)
</programlisting>
</para>
<para>Get a property from the CMake instance.  The value of the property is stored in the variable VAR.  If the property is not found, VAR will be set to "NOTFOUND".  Some supported properties include: VARIABLES, CACHE_VARIABLES, COMMANDS, MACROS, and COMPONENTS.
</para>
<para>See also the more general get_property() command.</para>
</sect2>
<sect2 id="cpack.command.get_directory_property">
<title>get_directory_property</title>
<abstract>
<para>Get a property of DIRECTORY scope.</para>
</abstract>
<para>
<programlisting>  get_directory_property(&lt;variable&gt; [DIRECTORY &lt;dir&gt;] &lt;prop-name&gt;)
</programlisting>
</para>
<para>Store a property of directory scope in the named variable.  If the property is not defined the empty-string is returned.  The DIRECTORY argument specifies another directory from which to retrieve the property value.  The specified directory must have already been traversed by CMake.
</para>
<para>
<programlisting>  get_directory_property(&lt;variable&gt; [DIRECTORY &lt;dir&gt;]
                         DEFINITION &lt;var-name&gt;)
</programlisting>
</para>
<para>Get a variable definition from a directory.  This form is useful to get a variable definition from another directory.
</para>
<para>See also the more general get_property() command.</para>
</sect2>
<sect2 id="cpack.command.get_filename_component">
<title>get_filename_component</title>
<abstract>
<para>Get a specific component of a full filename.</para>
</abstract>
<para>
<programlisting>  get_filename_component(&lt;VAR&gt; &lt;FileName&gt; &lt;COMP&gt; [CACHE])
</programlisting>
</para>
<para>Set &lt;VAR&gt; to a component of &lt;FileName&gt;, where &lt;COMP&gt; is one of:
</para>
<para>
<programlisting> DIRECTORY = Directory without file name
 NAME      = File name without directory
 EXT       = File name longest extension (.b.c from d/a.b.c)
 NAME_WE   = File name without directory or longest extension
 ABSOLUTE  = Full path to file
 REALPATH  = Full path to existing file with symlinks resolved
 PATH      = Legacy alias for DIRECTORY (use for CMake &lt;= 2.8.11)
</programlisting>
</para>
<para>Paths are returned with forward slashes and have no trailing slahes. The longest file extension is always considered. If the optional CACHE argument is specified, the result variable is added to the cache.
</para>
<para>
<programlisting>  get_filename_component(&lt;VAR&gt; FileName
                         PROGRAM [PROGRAM_ARGS &lt;ARG_VAR&gt;]
                         [CACHE])
</programlisting>
</para>
<para>The program in FileName will be found in the system search path or left as a full path.  If PROGRAM_ARGS is present with PROGRAM, then any command-line arguments present in the FileName string are split from the program name and stored in &lt;ARG_VAR&gt;.  This is used to separate a program name from its arguments in a command line string.</para>
</sect2>
<sect2 id="cpack.command.get_property">
<title>get_property</title>
<abstract>
<para>Get a property.</para>
</abstract>
<para>
<programlisting>  get_property(&lt;variable&gt;
               &lt;GLOBAL             |
                DIRECTORY [dir]    |
                TARGET    &lt;target&gt; |
                SOURCE    &lt;source&gt; |
                TEST      &lt;test&gt;   |
                CACHE     &lt;entry&gt;  |
                VARIABLE&gt;
               PROPERTY &lt;name&gt;
               [SET | DEFINED | BRIEF_DOCS | FULL_DOCS])
</programlisting>
</para>
<para>Get one property from one object in a scope.  The first argument specifies the variable in which to store the result.  The second argument determines the scope from which to get the property.  It must be one of the following:
</para>
<para>GLOBAL scope is unique and does not accept a name.
</para>
<para>DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.
</para>
<para>TARGET scope must name one existing target.
</para>
<para>SOURCE scope must name one source file.
</para>
<para>TEST scope must name one existing test.
</para>
<para>CACHE scope must name one cache entry.
</para>
<para>VARIABLE scope is unique and does not accept a name.
</para>
<para>The required PROPERTY option is immediately followed by the name of the property to get.  If the property is not set an empty value is returned.  If the SET option is given the variable is set to a boolean value indicating whether the property has been set.  If the DEFINED option is given the variable is set to a boolean value indicating whether the property has been defined such as with define_property. If BRIEF_DOCS or FULL_DOCS is given then the variable is set to a string containing documentation for the requested property.  If documentation is requested for a property that has not been defined NOTFOUND is returned.</para>
</sect2>
<sect2 id="cpack.command.if">
<title>if</title>
<abstract>
<para>Conditionally execute a group of commands.</para>
</abstract>
<para>
<programlisting>  if(expression)
    # then section.
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  elseif(expression2)
    # elseif section.
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  else(expression)
    # else section.
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endif(expression)
</programlisting>
</para>
<para>Evaluates the given expression.  If the result is true, the commands in the THEN section are invoked.  Otherwise, the commands in the else section are invoked.  The elseif and else sections are optional. You may have multiple elseif clauses. Note that the expression in the else and endif clause is optional. Long expressions can be used and there is a traditional order of precedence. Parenthetical expressions are evaluated first followed by unary operators such as EXISTS, COMMAND, and DEFINED. Then any EQUAL, LESS, GREATER, STRLESS, STRGREATER, STREQUAL, MATCHES will be evaluated. Then NOT operators and finally AND, OR operators will be evaluated. Possible expressions are:
</para>
<para>
<programlisting>  if(&lt;constant&gt;)
</programlisting>
</para>
<para>True if the constant is 1, ON, YES, TRUE, Y, or a non-zero number.  False if the constant is 0, OFF, NO, FALSE, N, IGNORE, NOTFOUND, '', or ends in the suffix '-NOTFOUND'.  Named boolean constants are case-insensitive.  If the argument is not one of these constants, it is treated as a variable:
</para>
<para>
<programlisting>  if(&lt;variable&gt;)
</programlisting>
</para>
<para>True if the variable is defined to a value that is not a false constant.  False otherwise.  (Note macro arguments are not variables.)
</para>
<para>
<programlisting>  if(NOT &lt;expression&gt;)
</programlisting>
</para>
<para>True if the expression is not true.
</para>
<para>
<programlisting>  if(&lt;expr1&gt; AND &lt;expr2&gt;)
</programlisting>
</para>
<para>True if both expressions would be considered true individually.
</para>
<para>
<programlisting>  if(&lt;expr1&gt; OR &lt;expr2&gt;)
</programlisting>
</para>
<para>True if either expression would be considered true individually.
</para>
<para>
<programlisting>  if(COMMAND command-name)
</programlisting>
</para>
<para>True if the given name is a command, macro or function that can be invoked.
</para>
<para>
<programlisting>  if(POLICY policy-id)
</programlisting>
</para>
<para>True if the given name is an existing policy (of the form CMP&lt;NNNN&gt;).
</para>
<para>
<programlisting>  if(TARGET target-name)
</programlisting>
</para>
<para>True if the given name is an existing target, built or imported.
</para>
<para>
<programlisting>  if(EXISTS file-name)
  if(EXISTS directory-name)
</programlisting>
</para>
<para>True if the named file or directory exists.  Behavior is well-defined only for full paths.
</para>
<para>
<programlisting>  if(file1 IS_NEWER_THAN file2)
</programlisting>
</para>
<para>True if file1 is newer than file2 or if one of the two files doesn't exist. Behavior is well-defined only for full paths. If the file time stamps are exactly the same, an IS_NEWER_THAN comparison returns true, so that any dependent build operations will occur in the event of a tie. This includes the case of passing the same file name for both file1 and file2.
</para>
<para>
<programlisting>  if(IS_DIRECTORY directory-name)
</programlisting>
</para>
<para>True if the given name is a directory.  Behavior is well-defined only for full paths.
</para>
<para>
<programlisting>  if(IS_SYMLINK file-name)
</programlisting>
</para>
<para>True if the given name is a symbolic link.  Behavior is well-defined only for full paths.
</para>
<para>
<programlisting>  if(IS_ABSOLUTE path)
</programlisting>
</para>
<para>True if the given path is an absolute path.
</para>
<para>
<programlisting>  if(&lt;variable|string&gt; MATCHES regex)
</programlisting>
</para>
<para>True if the given string or variable's value matches the given regular expression.
</para>
<para>
<programlisting>  if(&lt;variable|string&gt; LESS &lt;variable|string&gt;)
  if(&lt;variable|string&gt; GREATER &lt;variable|string&gt;)
  if(&lt;variable|string&gt; EQUAL &lt;variable|string&gt;)
</programlisting>
</para>
<para>True if the given string or variable's value is a valid number and the inequality or equality is true.
</para>
<para>
<programlisting>  if(&lt;variable|string&gt; STRLESS &lt;variable|string&gt;)
  if(&lt;variable|string&gt; STRGREATER &lt;variable|string&gt;)
  if(&lt;variable|string&gt; STREQUAL &lt;variable|string&gt;)
</programlisting>
</para>
<para>True if the given string or variable's value is lexicographically less (or greater, or equal) than the string or variable on the right.
</para>
<para>
<programlisting>  if(&lt;variable|string&gt; VERSION_LESS &lt;variable|string&gt;)
  if(&lt;variable|string&gt; VERSION_EQUAL &lt;variable|string&gt;)
  if(&lt;variable|string&gt; VERSION_GREATER &lt;variable|string&gt;)
</programlisting>
</para>
<para>Component-wise integer version number comparison (version format is major[.minor[.patch[.tweak]]]).
</para>
<para>
<programlisting>  if(DEFINED &lt;variable&gt;)
</programlisting>
</para>
<para>True if the given variable is defined. It does not matter if the variable is true or false just if it has been set.
</para>
<para>
<programlisting>  if((expression) AND (expression OR (expression)))
</programlisting>
</para>
<para>The expressions inside the parenthesis are evaluated first and then the remaining expression is evaluated as in the previous examples. Where there are nested parenthesis the innermost are evaluated as part of evaluating the expression that contains them.
</para>
<para>The if command was written very early in CMake's history, predating the ${} variable evaluation syntax, and for convenience evaluates variables named by its arguments as shown in the above signatures.  Note that normal variable evaluation with ${} applies before the if command even receives the arguments.  Therefore code like
</para>
<para>
<programlisting>  set(var1 OFF)
  set(var2 "var1")
  if(${var2})
</programlisting>
</para>
<para>appears to the if command as
</para>
<para>
<programlisting>  if(var1)
</programlisting>
</para>
<para>and is evaluated according to the if(&lt;variable&gt;) case documented above.  The result is OFF which is false.  However, if we remove the ${} from the example then the command sees
</para>
<para>
<programlisting>  if(var2)
</programlisting>
</para>
<para>which is true because var2 is defined to "var1" which is not a false constant.
</para>
<para>Automatic evaluation applies in the other cases whenever the above-documented signature accepts &lt;variable|string&gt;:
</para>
<para>1) The left hand argument to MATCHES is first checked to see if it is a defined variable, if so the variable's value is used, otherwise the original value is used. 
</para>
<para>2) If the left hand argument to MATCHES is missing it returns false without error 
</para>
<para>3) Both left and right hand arguments to LESS GREATER EQUAL are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. 
</para>
<para>4) Both left and right hand arguments to STRLESS STREQUAL STRGREATER are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. 
</para>
<para>5) Both left and right hand argumemnts to VERSION_LESS VERSION_EQUAL VERSION_GREATER are independently tested to see if they are defined variables, if so their defined values are used otherwise the original value is used. 
</para>
<para>6) The right hand argument to NOT is tested to see if it is a boolean constant, if so the value is used, otherwise it is assumed to be a variable and it is dereferenced. 
</para>
<para>7) The left and right hand arguments to AND OR are independently tested to see if they are boolean constants, if so they are used as such, otherwise they are assumed to be variables and are dereferenced. 
</para>
</sect2>
<sect2 id="cpack.command.include">
<title>include</title>
<abstract>
<para>Load and run CMake code from a file or module.</para>
</abstract>
<para>
<programlisting>  include(&lt;file|module&gt; [OPTIONAL] [RESULT_VARIABLE &lt;VAR&gt;]
                        [NO_POLICY_SCOPE])
</programlisting>
</para>
<para>Load and run CMake code from the file given.  Variable reads and writes access the scope of the caller (dynamic scoping).  If OPTIONAL is present, then no error is raised if the file does not exist.  If RESULT_VARIABLE is given the variable will be set to the full filename which has been included or NOTFOUND if it failed.
</para>
<para>If a module is specified instead of a file, the file with name &lt;modulename&gt;.cmake is searched first in CMAKE_MODULE_PATH, then in the CMake module directory. There is one exception to this: if the file which calls include() is located itself in the CMake module directory, then first the CMake module directory is searched and CMAKE_MODULE_PATH afterwards. See also policy CMP0017.
</para>
<para>See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.</para>
</sect2>
<sect2 id="cpack.command.list">
<title>list</title>
<abstract>
<para>List operations.</para>
</abstract>
<para>
<programlisting>  list(LENGTH &lt;list&gt; &lt;output variable&gt;)
  list(GET &lt;list&gt; &lt;element index&gt; [&lt;element index&gt; ...]
       &lt;output variable&gt;)
  list(APPEND &lt;list&gt; &lt;element&gt; [&lt;element&gt; ...])
  list(FIND &lt;list&gt; &lt;value&gt; &lt;output variable&gt;)
  list(INSERT &lt;list&gt; &lt;element_index&gt; &lt;element&gt; [&lt;element&gt; ...])
  list(REMOVE_ITEM &lt;list&gt; &lt;value&gt; [&lt;value&gt; ...])
  list(REMOVE_AT &lt;list&gt; &lt;index&gt; [&lt;index&gt; ...])
  list(REMOVE_DUPLICATES &lt;list&gt;)
  list(REVERSE &lt;list&gt;)
  list(SORT &lt;list&gt;)
</programlisting>
</para>
<para>LENGTH will return a given list's length.
</para>
<para>GET will return list of elements specified by indices from the list.
</para>
<para>APPEND will append elements to the list.
</para>
<para>FIND will return the index of the element specified in the list or -1 if it wasn't found.
</para>
<para>INSERT will insert elements to the list to the specified location.
</para>
<para>REMOVE_AT and REMOVE_ITEM will remove items from the list. The difference is that REMOVE_ITEM will remove the given items, while REMOVE_AT will remove the items at the given indices.
</para>
<para>REMOVE_DUPLICATES will remove duplicated items in the list.
</para>
<para>REVERSE reverses the contents of the list in-place.
</para>
<para>SORT sorts the list in-place alphabetically.
</para>
<para>The list subcommands APPEND, INSERT, REMOVE_AT, REMOVE_ITEM, REMOVE_DUPLICATES, REVERSE and SORT may create new values for the list within the current CMake variable scope. Similar to the SET command, the LIST command creates new variable values in the current scope, even if the list itself is actually defined in a parent scope. To propagate the results of these operations upwards, use SET with PARENT_SCOPE, SET with CACHE INTERNAL, or some other means of value propagation.
</para>
<para>NOTES: A list in cmake is a ; separated group of strings. To create a list the set command can be used. For example, set(var a b c d e)  creates a list with a;b;c;d;e, and set(var "a b c d e") creates a string or a list with one item in it.
</para>
<para>When specifying index values, if &lt;element index&gt; is 0 or greater, it is indexed from the beginning of the list, with 0 representing the first list element. If &lt;element index&gt; is -1 or lesser, it is indexed from the end of the list, with -1 representing the last list element. Be careful when counting with negative indices: they do not start from 0. -0 is equivalent to 0, the first list element.
</para>
</sect2>
<sect2 id="cpack.command.macro">
<title>macro</title>
<abstract>
<para>Start recording a macro for later invocation as a command.</para>
</abstract>
<para>
<programlisting>  macro(&lt;name&gt; [arg1 [arg2 [arg3 ...]]])
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endmacro(&lt;name&gt;)
</programlisting>
</para>
<para>Define a macro named &lt;name&gt; that takes arguments named arg1 arg2 arg3 (...).  Commands listed after macro, but before the matching endmacro, are not invoked until the macro is invoked.  When it is invoked, the commands recorded in the macro are first modified by replacing formal parameters (${arg1}) with the arguments passed, and then invoked as normal commands. In addition to referencing the formal parameters you can reference the values ${ARGC} which will be set to the number of arguments passed into the function as well as ${ARGV0} ${ARGV1} ${ARGV2} ... which will have the actual values of the arguments passed in. This facilitates creating macros with optional arguments. Additionally ${ARGV} holds the list of all arguments given to the macro and ${ARGN} holds the list of arguments past the last expected argument. Note that the parameters to a macro and values such as ARGN are not variables in the usual CMake sense. They are string replacements much like the C preprocessor would do with a macro. If you want true CMake variables and/or better CMake scope control you should look at the function command.
</para>
<para>See the cmake_policy() command documentation for the behavior of policies inside macros.</para>
</sect2>
<sect2 id="cpack.command.mark_as_advanced">
<title>mark_as_advanced</title>
<abstract>
<para>Mark cmake cached variables as advanced.</para>
</abstract>
<para>
<programlisting>  mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)
</programlisting>
</para>
<para>Mark the named cached variables as advanced.  An advanced variable will not be displayed in any of the cmake GUIs unless the show advanced option is on.  If CLEAR is the first argument advanced variables are changed back to unadvanced.  If FORCE is the first argument, then the variable is made advanced.  If neither FORCE nor CLEAR is specified, new values will be marked as advanced, but if the variable already has an advanced/non-advanced state, it will not be changed.
</para>
<para>It does nothing in script mode.</para>
</sect2>
<sect2 id="cpack.command.math">
<title>math</title>
<abstract>
<para>Mathematical expressions.</para>
</abstract>
<para>
<programlisting>  math(EXPR &lt;output variable&gt; &lt;math expression&gt;)
</programlisting>
</para>
<para>EXPR evaluates mathematical expression and returns result in the output variable. Example mathematical expression is '5 * ( 10 + 13 )'.  Supported operators are + - * / % | &amp; ^ ~ &lt;&lt; &gt;&gt; * / %.  They have the same meaning  as they do in C code.</para>
</sect2>
<sect2 id="cpack.command.message">
<title>message</title>
<abstract>
<para>Display a message to the user.</para>
</abstract>
<para>
<programlisting>  message([STATUS|WARNING|AUTHOR_WARNING|FATAL_ERROR|SEND_ERROR]
          "message to display" ...)
</programlisting>
</para>
<para>The optional keyword determines the type of message:
</para>
<para>
<programlisting>  (none)         = Important information
  STATUS         = Incidental information
  WARNING        = CMake Warning, continue processing
  AUTHOR_WARNING = CMake Warning (dev), continue processing
  SEND_ERROR     = CMake Error, continue processing,
                                but skip generation
  FATAL_ERROR    = CMake Error, stop processing and generation
</programlisting>
</para>
<para>The CMake command-line tool displays STATUS messages on stdout and all other message types on stderr.  The CMake GUI displays all messages in its log area.  The interactive dialogs (ccmake and CMakeSetup) show STATUS messages one at a time on a status line and other messages in interactive pop-up boxes.
</para>
<para>CMake Warning and Error message text displays using a simple markup language.  Non-indented text is formatted in line-wrapped paragraphs delimited by newlines.  Indented text is considered pre-formatted.</para>
</sect2>
<sect2 id="cpack.command.option">
<title>option</title>
<abstract>
<para>Provides an option that the user can optionally select.</para>
</abstract>
<para>
<programlisting>  option(&lt;option_variable&gt; "help string describing option"
         [initial value])
</programlisting>
</para>
<para>Provide an option for the user to select as ON or OFF.  If no initial value is provided, OFF is used.
</para>
<para>If you have options that depend on the values of other options, see the module help for CMakeDependentOption.</para>
</sect2>
<sect2 id="cpack.command.return">
<title>return</title>
<abstract>
<para>Return from a file, directory or function.</para>
</abstract>
<para>
<programlisting>  return()
</programlisting>
</para>
<para>Returns from a file, directory or function. When this command is encountered in an included file (via include() or find_package()), it causes processing of the current file to stop and control is returned to the including file. If it is encountered in a file which is not included by another file, e.g. a CMakeLists.txt, control is returned to the parent directory if there is one. If return is called in a function, control is returned to the caller of the function. Note that a macro is not a function and does not handle return like a function does.</para>
</sect2>
<sect2 id="cpack.command.separate_arguments">
<title>separate_arguments</title>
<abstract>
<para>Parse space-separated arguments into a semicolon-separated list.</para>
</abstract>
<para>
<programlisting>  separate_arguments(&lt;var&gt; &lt;UNIX|WINDOWS&gt;_COMMAND "&lt;args&gt;")
</programlisting>
</para>
<para>Parses a unix- or windows-style command-line string "&lt;args&gt;" and stores a semicolon-separated list of the arguments in &lt;var&gt;.  The entire command line must be given in one "&lt;args&gt;" argument.
</para>
<para>The UNIX_COMMAND mode separates arguments by unquoted whitespace.  It recognizes both single-quote and double-quote pairs.  A backslash escapes the next literal character (\" is "); there are no special escapes (\n is just n).
</para>
<para>The WINDOWS_COMMAND mode parses a windows command-line using the same syntax the runtime library uses to construct argv at startup.  It separates arguments by whitespace that is not double-quoted.  Backslashes are literal unless they precede double-quotes.  See the MSDN article "Parsing C Command-Line Arguments" for details.
</para>
<para>
<programlisting>  separate_arguments(VARIABLE)
</programlisting>
</para>
<para>Convert the value of VARIABLE to a semi-colon separated list.  All spaces are replaced with ';'.  This helps with generating command lines.</para>
</sect2>
<sect2 id="cpack.command.set">
<title>set</title>
<abstract>
<para>Set a CMake, cache or environment variable to a given value.</para>
</abstract>
<para>
<programlisting>  set(&lt;variable&gt; &lt;value&gt;
      [[CACHE &lt;type&gt; &lt;docstring&gt; [FORCE]] | PARENT_SCOPE])
</programlisting>
</para>
<para>Within CMake sets &lt;variable&gt; to the value &lt;value&gt;.  &lt;value&gt; is expanded before &lt;variable&gt; is set to it.  Normally, set will set a regular CMake variable. If CACHE is present, then the &lt;variable&gt; is put in the cache instead, unless it is already in the cache. See section 'Variable types in CMake' below for details of regular and cache variables and their interactions. If CACHE is used, &lt;type&gt; and &lt;docstring&gt; are required. &lt;type&gt; is used by the CMake GUI to choose a widget with which the user sets a value. The value for &lt;type&gt; may be one of
</para>
<para>
<programlisting>  FILEPATH = File chooser dialog.
  PATH     = Directory chooser dialog.
  STRING   = Arbitrary string.
  BOOL     = Boolean ON/OFF checkbox.
  INTERNAL = No GUI entry (used for persistent variables).
</programlisting>
</para>
<para>If &lt;type&gt; is INTERNAL, the cache variable is marked as internal, and will not be shown to the user in tools like cmake-gui. This is intended for values that should be persisted in the cache, but which users should not normally change. INTERNAL implies FORCE.
</para>
<para>Normally, set(...CACHE...) creates cache variables, but does not modify them. If FORCE is specified, the value of the cache variable is set, even if the variable is already in the cache. This should normally be avoided, as it will remove any changes to the cache variable's value by the user.
</para>
<para>If PARENT_SCOPE is present, the variable will be set in the scope above the current scope. Each new directory or function creates a new scope. This command will set the value of a variable into the parent directory or calling function (whichever is applicable to the case at hand). PARENT_SCOPE cannot be combined with CACHE.
</para>
<para>If &lt;value&gt; is not specified then the variable is removed instead of set.  See also: the unset() command.
</para>
<para>
<programlisting>  set(&lt;variable&gt; &lt;value1&gt; ... &lt;valueN&gt;)
</programlisting>
</para>
<para>In this case &lt;variable&gt; is set to a semicolon separated list of values.
</para>
<para>&lt;variable&gt; can be an environment variable such as:
</para>
<para>
<programlisting>  set( ENV{PATH} /home/martink )
</programlisting>
</para>
<para>in which case the environment variable will be set.
</para>
<para>*** Variable types in CMake ***
</para>
<para>In CMake there are two types of variables: normal variables and cache variables. Normal variables are meant for the internal use of the script (just like variables in most programming languages); they are not persisted across CMake runs. Cache variables (unless set with INTERNAL) are mostly intended for configuration settings where the first CMake run determines a suitable default value, which the user can then override, by editing the cache with tools such as ccmake or cmake-gui. Cache variables are stored in the CMake cache file, and are persisted across CMake runs. 
</para>
<para>Both types can exist at the same time with the same name but different values. When ${FOO} is evaluated, CMake first looks for a normal variable 'FOO' in scope and uses it if set. If and only if no normal variable exists then it falls back to the cache variable 'FOO'.
</para>
<para>Some examples:
</para>
<para>The code 'set(FOO "x")' sets the normal variable 'FOO'. It does not touch the cache, but it will hide any existing cache value 'FOO'.
</para>
<para>The code 'set(FOO "x" CACHE ...)' checks for 'FOO' in the cache, ignoring any normal variable of the same name. If 'FOO' is in the cache then nothing happens to either the normal variable or the cache variable. If 'FOO' is not in the cache, then it is added to the cache.
</para>
<para>Finally, whenever a cache variable is added or modified by a command, CMake also *removes* the normal variable of the same name from the current scope so that an immediately following evaluation of it will expose the newly cached value.
</para>
<para>Normally projects should avoid using normal and cache variables of the same name, as this interaction can be hard to follow. However, in some situations it can be useful. One example (used by some projects):
</para>
<para>A project has a subproject in its source tree. The child project has its own CMakeLists.txt, which is included from the parent CMakeLists.txt using add_subdirectory(). Now, if the parent and the child project provide the same option (for example a compiler option), the parent gets the first chance to add a user-editable option to the cache. Normally, the child would then use the same value that the parent uses. However, it may be necessary to hard-code the value for the child project's option while still allowing the user to edit the value used by the parent project. The parent project can achieve this simply by setting a normal variable with the same name as the option in a scope sufficient to hide the option's cache variable from the child completely. The parent has already set the cache variable,  so the child's set(...CACHE...) will do nothing, and evaluating the option variable will use the value from the normal variable, which hides the cache variable.</para>
</sect2>
<sect2 id="cpack.command.set_directory_properties">
<title>set_directory_properties</title>
<abstract>
<para>Set a property of the directory.</para>
</abstract>
<para>
<programlisting>  set_directory_properties(PROPERTIES prop1 value1 prop2 value2)
</programlisting>
</para>
<para>Set a property for the current directory and subdirectories. If the property is not found, CMake will report an error. The properties include: INCLUDE_DIRECTORIES, LINK_DIRECTORIES, INCLUDE_REGULAR_EXPRESSION, and ADDITIONAL_MAKE_CLEAN_FILES. ADDITIONAL_MAKE_CLEAN_FILES is a list of files that will be cleaned as a part of "make clean" stage.</para>
</sect2>
<sect2 id="cpack.command.set_property">
<title>set_property</title>
<abstract>
<para>Set a named property in a given scope.</para>
</abstract>
<para>
<programlisting>  set_property(&lt;GLOBAL                            |
                DIRECTORY [dir]                   |
                TARGET    [target1 [target2 ...]] |
                SOURCE    [src1 [src2 ...]]       |
                TEST      [test1 [test2 ...]]     |
                CACHE     [entry1 [entry2 ...]]&gt;
               [APPEND] [APPEND_STRING]
               PROPERTY &lt;name&gt; [value1 [value2 ...]])
</programlisting>
</para>
<para>Set one property on zero or more objects of a scope.  The first argument determines the scope in which the property is set.  It must be one of the following:
</para>
<para>GLOBAL scope is unique and does not accept a name.
</para>
<para>DIRECTORY scope defaults to the current directory but another directory (already processed by CMake) may be named by full or relative path.
</para>
<para>TARGET scope may name zero or more existing targets.
</para>
<para>SOURCE scope may name zero or more source files.  Note that source file properties are visible only to targets added in the same directory (CMakeLists.txt).
</para>
<para>TEST scope may name zero or more existing tests.
</para>
<para>CACHE scope must name zero or more cache existing entries.
</para>
<para>The required PROPERTY option is immediately followed by the name of the property to set.  Remaining arguments are used to compose the property value in the form of a semicolon-separated list.  If the APPEND option is given the list is appended to any existing property value.If the APPEND_STRING option is given the string is append to any existing property value as string, i.e. it results in a longer string and not a list of strings.</para>
</sect2>
<sect2 id="cpack.command.site_name">
<title>site_name</title>
<abstract>
<para>Set the given variable to the name of the computer.</para>
</abstract>
<para>
<programlisting>  site_name(variable)
</programlisting>
</para>
</sect2>
<sect2 id="cpack.command.string">
<title>string</title>
<abstract>
<para>String operations.</para>
</abstract>
<para>
<programlisting>  string(REGEX MATCH &lt;regular_expression&gt;
         &lt;output variable&gt; &lt;input&gt; [&lt;input&gt;...])
  string(REGEX MATCHALL &lt;regular_expression&gt;
         &lt;output variable&gt; &lt;input&gt; [&lt;input&gt;...])
  string(REGEX REPLACE &lt;regular_expression&gt;
         &lt;replace_expression&gt; &lt;output variable&gt;
         &lt;input&gt; [&lt;input&gt;...])
  string(REPLACE &lt;match_string&gt;
         &lt;replace_string&gt; &lt;output variable&gt;
         &lt;input&gt; [&lt;input&gt;...])
  string(&lt;MD5|SHA1|SHA224|SHA256|SHA384|SHA512&gt;
         &lt;output variable&gt; &lt;input&gt;)
  string(COMPARE EQUAL &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(COMPARE NOTEQUAL &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(COMPARE LESS &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(COMPARE GREATER &lt;string1&gt; &lt;string2&gt; &lt;output variable&gt;)
  string(ASCII &lt;number&gt; [&lt;number&gt; ...] &lt;output variable&gt;)
  string(CONFIGURE &lt;string1&gt; &lt;output variable&gt;
         [@ONLY] [ESCAPE_QUOTES])
  string(TOUPPER &lt;string1&gt; &lt;output variable&gt;)
  string(TOLOWER &lt;string1&gt; &lt;output variable&gt;)
  string(LENGTH &lt;string&gt; &lt;output variable&gt;)
  string(SUBSTRING &lt;string&gt; &lt;begin&gt; &lt;length&gt; &lt;output variable&gt;)
  string(STRIP &lt;string&gt; &lt;output variable&gt;)
  string(RANDOM [LENGTH &lt;length&gt;] [ALPHABET &lt;alphabet&gt;]
         [RANDOM_SEED &lt;seed&gt;] &lt;output variable&gt;)
  string(FIND &lt;string&gt; &lt;substring&gt; &lt;output variable&gt; [REVERSE])
  string(TIMESTAMP &lt;output variable&gt; [&lt;format string&gt;] [UTC])
  string(MAKE_C_IDENTIFIER &lt;input string&gt; &lt;output variable&gt;)
</programlisting>
</para>
<para>REGEX MATCH will match the regular expression once and store the match in the output variable.
</para>
<para>REGEX MATCHALL will match the regular expression as many times as possible and store the matches in the output variable as a list.
</para>
<para>REGEX REPLACE will match the regular expression as many times as possible and substitute the replacement expression for the match in the output.  The replace expression may refer to paren-delimited subexpressions of the match using \1, \2, ..., \9.  Note that two backslashes (\\1) are required in CMake code to get a backslash through argument parsing.
</para>
<para>REPLACE will replace all occurrences of match_string in the input with replace_string and store the result in the output.
</para>
<para>MD5, SHA1, SHA224, SHA256, SHA384, and SHA512 will compute a cryptographic hash of the input string.
</para>
<para>COMPARE EQUAL/NOTEQUAL/LESS/GREATER will compare the strings and store true or false in the output variable.
</para>
<para>ASCII will convert all numbers into corresponding ASCII characters.
</para>
<para>CONFIGURE will transform a string like CONFIGURE_FILE transforms a file.
</para>
<para>TOUPPER/TOLOWER will convert string to upper/lower characters.
</para>
<para>LENGTH will return a given string's length.
</para>
<para>SUBSTRING will return a substring of a given string. If length is -1 the remainder of the string starting at begin will be returned.
</para>
<para>STRIP will return a substring of a given string with leading and trailing spaces removed.
</para>
<para>RANDOM will return a random string of given length consisting of characters from the given alphabet. Default length is 5 characters and default alphabet is all numbers and upper and lower case letters.  If an integer RANDOM_SEED is given, its value will be used to seed the random number generator.
</para>
<para>FIND will return the position where the given substring was found in the supplied string. If the REVERSE flag was used, the command will search for the position of the last occurrence of the specified substring.
</para>
<para>The following characters have special meaning in regular expressions:
</para>
<para>
<programlisting>   ^         Matches at beginning of input
   $         Matches at end of input
   .         Matches any single character
   [ ]       Matches any character(s) inside the brackets
   [^ ]      Matches any character(s) not inside the brackets
    -        Inside brackets, specifies an inclusive range between
             characters on either side e.g. [a-f] is [abcdef]
             To match a literal - using brackets, make it the first
             or the last character e.g. [+*/-] matches basic
             mathematical operators.
   *         Matches preceding pattern zero or more times
   +         Matches preceding pattern one or more times
   ?         Matches preceding pattern zero or once only
   |         Matches a pattern on either side of the |
   ()        Saves a matched subexpression, which can be referenced 
             in the REGEX REPLACE operation. Additionally it is saved
             by all regular expression-related commands, including 
             e.g. if( MATCHES ), in the variables CMAKE_MATCH_(0..9).
</programlisting>
</para>
<para>*, + and ? have higher precedence than concatenation. | has lower precedence than concatenation. This means that the regular expression "^ab+d$" matches "abbd" but not "ababd", and the regular expression "^(ab|cd)$" matches "ab" but not "abd".
</para>
<para>TIMESTAMP will write a string representation of the current date and/or time to the output variable.
</para>
<para>Should the command be unable to obtain a timestamp the output variable will be set to the empty string "".
</para>
<para>The optional UTC flag requests the current date/time representation to be in Coordinated Universal Time (UTC) rather than local time.
</para>
<para>The optional &lt;format string&gt; may contain the following format specifiers: 
</para>
<para>
<programlisting>   %d        The day of the current month (01-31).
   %H        The hour on a 24-hour clock (00-23).
   %I        The hour on a 12-hour clock (01-12).
   %j        The day of the current year (001-366).
   %m        The month of the current year (01-12).
   %M        The minute of the current hour (00-59).
   %S        The second of the current minute.
             60 represents a leap second. (00-60)
   %U        The week number of the current year (00-53).
   %w        The day of the current week. 0 is Sunday. (0-6)
   %y        The last two digits of the current year (00-99)
   %Y        The current year. 
</programlisting>
</para>
<para>Unknown format specifiers will be ignored and copied to the output as-is.
</para>
<para>If no explicit &lt;format string&gt; is given it will default to:
</para>
<para>
<programlisting>   %Y-%m-%dT%H:%M:%S    for local time.
   %Y-%m-%dT%H:%M:%SZ   for UTC.
</programlisting>
</para>
<para>MAKE_C_IDENTIFIER will write a string which can be used as an identifier in C.</para>
</sect2>
<sect2 id="cpack.command.unset">
<title>unset</title>
<abstract>
<para>Unset a variable, cache variable, or environment variable.</para>
</abstract>
<para>
<programlisting>  unset(&lt;variable&gt; [CACHE])
</programlisting>
</para>
<para>Removes the specified variable causing it to become undefined.  If CACHE is present then the variable is removed from the cache instead of the current scope.
</para>
<para>&lt;variable&gt; can be an environment variable such as:
</para>
<para>
<programlisting>  unset(ENV{LD_LIBRARY_PATH})
</programlisting>
</para>
<para>in which case the variable will be removed from the current environment.</para>
</sect2>
<sect2 id="cpack.command.variable_watch">
<title>variable_watch</title>
<abstract>
<para>Watch the CMake variable for change.</para>
</abstract>
<para>
<programlisting>  variable_watch(&lt;variable name&gt; [&lt;command to execute&gt;])
</programlisting>
</para>
<para>If the specified variable changes, the message will be printed about the variable being changed. If the command is specified, the command will be executed. The command will receive the following arguments: COMMAND(&lt;variable&gt; &lt;access&gt; &lt;value&gt; &lt;current list file&gt; &lt;stack&gt;)</para>
</sect2>
<sect2 id="cpack.command.while">
<title>while</title>
<abstract>
<para>Evaluate a group of commands while a condition is true</para>
</abstract>
<para>
<programlisting>  while(condition)
    COMMAND1(ARGS ...)
    COMMAND2(ARGS ...)
    ...
  endwhile(condition)
</programlisting>
</para>
<para>All commands between while and the matching endwhile are recorded without being invoked.  Once the endwhile is evaluated, the recorded list of commands is invoked as long as the condition is true. The condition is evaluated using the same logic as the if command.</para>
</sect2>
</sect1>
<sect1 id="cpack.Compatibility_Commands">
<title>Compatibility Commands</title>
<para>
<programlisting>  CMake Compatibility Listfile Commands - Obsolete commands supported by CMake for compatibility.</programlisting>
</para>
<para>This is the documentation for now obsolete listfile commands from previous CMake versions, which are still supported for compatibility reasons. You should instead use the newer, faster and shinier new commands. ;-)</para>
</sect1>
<sect1 id="cpack.Standard_CMake_Modules">
<title>Standard CMake Modules</title>
<para/>
</sect1>
<sect1 id="cpack.Properties_of_Global_Scope">
<title>Properties of Global Scope</title>
<sect2 id="cpack.prop_global.ALLOW_DUPLICATE_CUSTOM_TARGETS">
<title>ALLOW_DUPLICATE_CUSTOM_TARGETS</title>
<abstract>
<para>Allow duplicate custom targets to be created.</para>
</abstract>
<para>Normally CMake requires that all targets built in a project have globally unique logical names (see policy CMP0002).  This is necessary to generate meaningful project file names in Xcode and VS IDE generators.  It also allows the target names to be referenced unambiguously.
</para>
<para>Makefile generators are capable of supporting duplicate custom target names.  For projects that care only about Makefile generators and do not wish to support Xcode or VS IDE generators, one may set this property to true to allow duplicate custom targets.  The property allows multiple add_custom_target command calls in different directories to specify the same target name.  However, setting this property will cause non-Makefile generators to produce an error and refuse to generate the project.</para>
</sect2>
<sect2 id="cpack.prop_global.AUTOMOC_TARGETS_FOLDER">
<title>AUTOMOC_TARGETS_FOLDER</title>
<abstract>
<para>Name of FOLDER for *_automoc targets that are added automatically by CMake for targets for which AUTOMOC is enabled.</para>
</abstract>
<para>If not set, CMake uses the FOLDER property of the parent target as a default value for this property. See also the documentation for the FOLDER target property and the AUTOMOC target property.</para>
</sect2>
<sect2 id="cpack.prop_global.DEBUG_CONFIGURATIONS">
<title>DEBUG_CONFIGURATIONS</title>
<abstract>
<para>Specify which configurations are for debugging.</para>
</abstract>
<para>The value must be a semi-colon separated list of configuration names.  Currently this property is used only by the target_link_libraries command (see its documentation for details).  Additional uses may be defined in the future.  
</para>
<para>This property must be set at the top level of the project and before the first target_link_libraries command invocation.  If any entry in the list does not match a valid configuration for the project the behavior is undefined.</para>
</sect2>
<sect2 id="cpack.prop_global.DISABLED_FEATURES">
<title>DISABLED_FEATURES</title>
<abstract>
<para>List of features which are disabled during the CMake run.</para>
</abstract>
<para>List of features which are disabled during the CMake run. By default it contains the names of all packages which were not found. This is determined using the &lt;NAME&gt;_FOUND variables. Packages which are searched QUIET are not listed. A project can add its own features to this list. This property is used by the macros in FeatureSummary.cmake.</para>
</sect2>
<sect2 id="cpack.prop_global.ENABLED_FEATURES">
<title>ENABLED_FEATURES</title>
<abstract>
<para>List of features which are enabled during the CMake run.</para>
</abstract>
<para>List of features which are enabled during the CMake run. By default it contains the names of all packages which were found. This is determined using the &lt;NAME&gt;_FOUND variables. Packages which are searched QUIET are not listed. A project can add its own features to this list. This property is used by the macros in FeatureSummary.cmake.</para>
</sect2>
<sect2 id="cpack.prop_global.ENABLED_LANGUAGES">
<title>ENABLED_LANGUAGES</title>
<abstract>
<para>Read-only property that contains the list of currently enabled languages</para>
</abstract>
<para>Set to list of currently enabled languages.</para>
</sect2>
<sect2 id="cpack.prop_global.FIND_LIBRARY_USE_LIB64_PATHS">
<title>FIND_LIBRARY_USE_LIB64_PATHS</title>
<abstract>
<para>Whether FIND_LIBRARY should automatically search lib64 directories.</para>
</abstract>
<para>FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the FIND_LIBRARY command should automatically search the lib64 variant of directories called lib in the search path when building 64-bit binaries.</para>
</sect2>
<sect2 id="cpack.prop_global.FIND_LIBRARY_USE_OPENBSD_VERSIONING">
<title>FIND_LIBRARY_USE_OPENBSD_VERSIONING</title>
<abstract>
<para>Whether FIND_LIBRARY should find OpenBSD-style shared libraries.</para>
</abstract>
<para>This property is a boolean specifying whether the FIND_LIBRARY command should find shared libraries with OpenBSD-style versioned extension: ".so.&lt;major&gt;.&lt;minor&gt;".  The property is set to true on OpenBSD and false on other platforms.</para>
</sect2>
<sect2 id="cpack.prop_global.GLOBAL_DEPENDS_DEBUG_MODE">
<title>GLOBAL_DEPENDS_DEBUG_MODE</title>
<abstract>
<para>Enable global target dependency graph debug mode.</para>
</abstract>
<para>CMake automatically analyzes the global inter-target dependency graph at the beginning of native build system generation.  This property causes it to display details of its analysis to stderr.</para>
</sect2>
<sect2 id="cpack.prop_global.GLOBAL_DEPENDS_NO_CYCLES">
<title>GLOBAL_DEPENDS_NO_CYCLES</title>
<abstract>
<para>Disallow global target dependency graph cycles.</para>
</abstract>
<para>CMake automatically analyzes the global inter-target dependency graph at the beginning of native build system generation.  It reports an error if the dependency graph contains a cycle that does not consist of all STATIC library targets.  This property tells CMake to disallow all cycles completely, even among static libraries.</para>
</sect2>
<sect2 id="cpack.prop_global.IN_TRY_COMPILE">
<title>IN_TRY_COMPILE</title>
<abstract>
<para>Read-only property that is true during a try-compile configuration.</para>
</abstract>
<para>True when building a project inside a TRY_COMPILE or TRY_RUN command.</para>
</sect2>
<sect2 id="cpack.prop_global.PACKAGES_FOUND">
<title>PACKAGES_FOUND</title>
<abstract>
<para>List of packages which were found during the CMake run.</para>
</abstract>
<para>List of packages which were found during the CMake run. Whether a package has been found is determined using the &lt;NAME&gt;_FOUND variables.</para>
</sect2>
<sect2 id="cpack.prop_global.PACKAGES_NOT_FOUND">
<title>PACKAGES_NOT_FOUND</title>
<abstract>
<para>List of packages which were not found during the CMake run.</para>
</abstract>
<para>List of packages which were not found during the CMake run. Whether a package has been found is determined using the &lt;NAME&gt;_FOUND variables.</para>
</sect2>
<sect2 id="cpack.prop_global.PREDEFINED_TARGETS_FOLDER">
<title>PREDEFINED_TARGETS_FOLDER</title>
<abstract>
<para>Name of FOLDER for targets that are added automatically by CMake.</para>
</abstract>
<para>If not set, CMake uses "CMakePredefinedTargets" as a default value for this property. Targets such as INSTALL, PACKAGE and RUN_TESTS will be organized into this FOLDER. See also the documentation for the FOLDER target property.</para>
</sect2>
<sect2 id="cpack.prop_global.REPORT_UNDEFINED_PROPERTIES">
<title>REPORT_UNDEFINED_PROPERTIES</title>
<abstract>
<para>If set, report any undefined properties to this file.</para>
</abstract>
<para>If this property is set to a filename then when CMake runs it will report any properties or variables that were accessed but not defined into the filename specified in this property.</para>
</sect2>
<sect2 id="cpack.prop_global.RULE_LAUNCH_COMPILE">
<title>RULE_LAUNCH_COMPILE</title>
<abstract>
<para>Specify a launcher for compile rules.</para>
</abstract>
<para>Makefile generators prefix compiler commands with the given launcher command line.  This is intended to allow launchers to intercept build problems with high granularity.  Non-Makefile generators currently ignore this property.</para>
</sect2>
<sect2 id="cpack.prop_global.RULE_LAUNCH_CUSTOM">
<title>RULE_LAUNCH_CUSTOM</title>
<abstract>
<para>Specify a launcher for custom rules.</para>
</abstract>
<para>Makefile generators prefix custom commands with the given launcher command line.  This is intended to allow launchers to intercept build problems with high granularity.  Non-Makefile generators currently ignore this property.</para>
</sect2>
<sect2 id="cpack.prop_global.RULE_LAUNCH_LINK">
<title>RULE_LAUNCH_LINK</title>
<abstract>
<para>Specify a launcher for link rules.</para>
</abstract>
<para>Makefile generators prefix link and archive commands with the given launcher command line.  This is intended to allow launchers to intercept build problems with high granularity.  Non-Makefile generators currently ignore this property.</para>
</sect2>
<sect2 id="cpack.prop_global.RULE_MESSAGES">
<title>RULE_MESSAGES</title>
<abstract>
<para>Specify whether to report a message for each make rule.</para>
</abstract>
<para>This property specifies whether Makefile generators should add a progress message describing what each build rule does.  If the property is not set the default is ON.  Set the property to OFF to disable granular messages and report only as each target completes.  This is intended to allow scripted builds to avoid the build time cost of detailed reports.  If a CMAKE_RULE_MESSAGES cache entry exists its value initializes the value of this property.  Non-Makefile generators currently ignore this property.</para>
</sect2>
<sect2 id="cpack.prop_global.TARGET_ARCHIVES_MAY_BE_SHARED_LIBS">
<title>TARGET_ARCHIVES_MAY_BE_SHARED_LIBS</title>
<abstract>
<para>Set if shared libraries may be named like archives.</para>
</abstract>
<para>On AIX shared libraries may be named "lib&lt;name&gt;.a".  This property is set to true on such platforms.</para>
</sect2>
<sect2 id="cpack.prop_global.TARGET_SUPPORTS_SHARED_LIBS">
<title>TARGET_SUPPORTS_SHARED_LIBS</title>
<abstract>
<para>Does the target platform support shared libraries.</para>
</abstract>
<para>TARGET_SUPPORTS_SHARED_LIBS is a boolean specifying whether the target platform supports shared libraries. Basically all current general general purpose OS do so, the exception are usually embedded systems with no or special OSs.</para>
</sect2>
<sect2 id="cpack.prop_global.USE_FOLDERS">
<title>USE_FOLDERS</title>
<abstract>
<para>Use the FOLDER target property to organize targets into folders.</para>
</abstract>
<para>If not set, CMake treats this property as OFF by default. CMake generators that are capable of organizing into a hierarchy of folders use the values of the FOLDER target property to name those folders. See also the documentation for the FOLDER target property.</para>
</sect2>
<sect2 id="cpack.prop_global.__CMAKE_DELETE_CACHE_CHANGE_VARS_">
<title>__CMAKE_DELETE_CACHE_CHANGE_VARS_</title>
<abstract>
<para>Internal property</para>
</abstract>
<para>Used to detect compiler changes, Do not set.</para>
</sect2>
</sect1>
<sect1 id="cpack.Properties_on_Cache_Entries">
<title>Properties on Cache Entries</title>
<sect2 id="cpack.property.ADVANCED">
<title>ADVANCED</title>
<abstract>
<para>True if entry should be hidden by default in GUIs.</para>
</abstract>
<para>This is a boolean value indicating whether the entry is considered interesting only for advanced configuration.  The mark_as_advanced() command modifies this property.</para>
</sect2>
<sect2 id="cpack.property.HELPSTRING">
<title>HELPSTRING</title>
<abstract>
<para>Help associated with entry in GUIs.</para>
</abstract>
<para>This string summarizes the purpose of an entry to help users set it through a CMake GUI.</para>
</sect2>
<sect2 id="cpack.property.MODIFIED">
<title>MODIFIED</title>
<abstract>
<para>Internal management property.  Do not set or get.</para>
</abstract>
<para>This is an internal cache entry property managed by CMake to track interactive user modification of entries.  Ignore it.</para>
</sect2>
<sect2 id="cpack.property.STRINGS">
<title>STRINGS</title>
<abstract>
<para>Enumerate possible STRING entry values for GUI selection.</para>
</abstract>
<para>For cache entries with type STRING, this enumerates a set of values.  CMake GUIs may use this to provide a selection widget instead of a generic string entry field.  This is for convenience only.  CMake does not enforce that the value matches one of those listed.</para>
</sect2>
<sect2 id="cpack.property.TYPE">
<title>TYPE</title>
<abstract>
<para>Widget type for entry in GUIs.</para>
</abstract>
<para>Cache entry values are always strings, but CMake GUIs present widgets to help users set values.  The GUIs use this property as a hint to determine the widget type.  Valid TYPE values are:
</para>
<para>
<programlisting>  BOOL          = Boolean ON/OFF value.
  PATH          = Path to a directory.
  FILEPATH      = Path to a file.
  STRING        = Generic string value.
  INTERNAL      = Do not present in GUI at all.
  STATIC        = Value managed by CMake, do not change.
  UNINITIALIZED = Type not yet specified.
</programlisting>
</para>
<para>Generally the TYPE of a cache entry should be set by the command which creates it (set, option, find_library, etc.).</para>
</sect2>
<sect2 id="cpack.property.VALUE">
<title>VALUE</title>
<abstract>
<para>Value of a cache entry.</para>
</abstract>
<para>This property maps to the actual value of a cache entry.  Setting this property always sets the value without checking, so use with care.</para>
</sect2>
</sect1>
<sect1 id="cpack.Properties_on_Directories">
<title>Properties on Directories</title>
<sect2 id="cpack.prop_dir.ADDITIONAL_MAKE_CLEAN_FILES">
<title>ADDITIONAL_MAKE_CLEAN_FILES</title>
<abstract>
<para>Additional files to clean during the make clean stage.</para>
</abstract>
<para>A list of files that will be cleaned as a part of the "make clean" stage. </para>
</sect2>
<sect2 id="cpack.prop_dir.CACHE_VARIABLES">
<title>CACHE_VARIABLES</title>
<abstract>
<para>List of cache variables available in the current directory.</para>
</abstract>
<para>This read-only property specifies the list of CMake cache variables currently defined.  It is intended for debugging purposes.</para>
</sect2>
<sect2 id="cpack.prop_dir.CLEAN_NO_CUSTOM">
<title>CLEAN_NO_CUSTOM</title>
<abstract>
<para>Should the output of custom commands be left.</para>
</abstract>
<para>If this is true then the outputs of custom commands for this directory will not be removed during the "make clean" stage. </para>
</sect2>
<sect2 id="cpack.prop_dir.COMPILE_DEFINITIONS">
<title>COMPILE_DEFINITIONS</title>
<abstract>
<para>Preprocessor definitions for compiling a directory's sources.</para>
</abstract>
<para>The COMPILE_DEFINITIONS property may be set to a semicolon-separated list of preprocessor definitions using the syntax VAR or VAR=value.  Function-style definitions are not supported.  CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values).  This property may be set on a per-configuration basis using the name COMPILE_DEFINITIONS_&lt;CONFIG&gt; where &lt;CONFIG&gt; is an upper-case name (ex. "COMPILE_DEFINITIONS_DEBUG").  This property will be initialized in each directory by its value in the directory's parent.
</para>
<para>CMake will automatically drop some definitions that are not supported by the native build tool.  The VS6 IDE does not support definition values with spaces (but NMake does).
</para>
<para>Disclaimer: Most native build tools have poor support for escaping certain values.  CMake has work-arounds for many cases but some values may just not be possible to pass correctly.  If a value does not seem to be escaped correctly, do not attempt to work-around the problem by adding escape sequences to the value.  Your work-around may break in a future version of CMake that has improved escape support.  Instead consider defining the macro in a (configured) header file.  Then report the limitation.  Known limitations include:
</para>
<para>
<programlisting>  #          - broken almost everywhere
  ;          - broken in VS IDE 7.0 and Borland Makefiles
  ,          - broken in VS IDE
  %          - broken in some cases in NMake
  &amp; |        - broken in some cases on MinGW
  ^ &lt; &gt; \"   - broken in most Make tools on Windows
</programlisting>
</para>
<para>CMake does not reject these values outright because they do work in some cases.  Use with caution.  </para>
</sect2>
<sect2 id="cpack.prop_dir.COMPILE_DEFINITIONS__CONFIG_">
<title>COMPILE_DEFINITIONS_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration preprocessor definitions in a directory.</para>
</abstract>
<para>This is the configuration-specific version of COMPILE_DEFINITIONS.  This property will be initialized in each directory by its value in the directory's parent.
</para>
</sect2>
<sect2 id="cpack.prop_dir.COMPILE_OPTIONS">
<title>COMPILE_OPTIONS</title>
<abstract>
<para>List of options to pass to the compiler.</para>
</abstract>
<para>This property specifies the list of directories given so far for this property.  This property exists on directories and targets.
</para>
<para>The target property values are used by the generators to set the options for the compiler.
</para>
<para>Contents of COMPILE_OPTIONS may use "generator expressions" with the syntax "$&lt;...&gt;".  Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_dir.DEFINITIONS">
<title>DEFINITIONS</title>
<abstract>
<para>For CMake 2.4 compatibility only.  Use COMPILE_DEFINITIONS instead.</para>
</abstract>
<para>This read-only property specifies the list of flags given so far to the add_definitions command.  It is intended for debugging purposes.  Use the COMPILE_DEFINITIONS instead.</para>
</sect2>
<sect2 id="cpack.prop_dir.EXCLUDE_FROM_ALL">
<title>EXCLUDE_FROM_ALL</title>
<abstract>
<para>Exclude the directory from the all target of its parent.</para>
</abstract>
<para>A property on a directory that indicates if its targets are excluded from the default build target. If it is not, then with a Makefile for example typing make will cause the targets to be built. The same concept applies to the default build of other generators.</para>
</sect2>
<sect2 id="cpack.prop_dir.IMPLICIT_DEPENDS_INCLUDE_TRANSFORM">
<title>IMPLICIT_DEPENDS_INCLUDE_TRANSFORM</title>
<abstract>
<para>Specify #include line transforms for dependencies in a directory.</para>
</abstract>
<para>This property specifies rules to transform macro-like #include lines during implicit dependency scanning of C and C++ source files.  The list of rules must be semicolon-separated with each entry of the form "A_MACRO(%)=value-with-%" (the % must be literal).  During dependency scanning occurrences of A_MACRO(...) on #include lines will be replaced by the value given with the macro argument substituted for '%'.  For example, the entry
</para>
<para>
<programlisting>  MYDIR(%)=&lt;mydir/%&gt;
</programlisting>
</para>
<para>will convert lines of the form
</para>
<para>
<programlisting>  #include MYDIR(myheader.h)
</programlisting>
</para>
<para>to
</para>
<para>
<programlisting>  #include &lt;mydir/myheader.h&gt;
</programlisting>
</para>
<para>allowing the dependency to be followed.
</para>
<para>This property applies to sources in all targets within a directory.  The property value is initialized in each directory by its value in the directory's parent.</para>
</sect2>
<sect2 id="cpack.prop_dir.INCLUDE_DIRECTORIES">
<title>INCLUDE_DIRECTORIES</title>
<abstract>
<para>List of preprocessor include file search directories.</para>
</abstract>
<para>This property specifies the list of directories given so far to the include_directories command.  This property exists on directories and targets.  In addition to accepting values from the include_directories command, values may be set directly on any directory or any target using the set_property command.  A target gets its initial value for this property from the value of the directory property.  A directory gets its initial value from its parent directory if it has one.  Both directory and target property values are adjusted by calls to the include_directories command.
</para>
<para>The target property values are used by the generators to set the include paths for the compiler.  See also the include_directories command.</para>
</sect2>
<sect2 id="cpack.prop_dir.INCLUDE_REGULAR_EXPRESSION">
<title>INCLUDE_REGULAR_EXPRESSION</title>
<abstract>
<para>Include file scanning regular expression.</para>
</abstract>
<para>This read-only property specifies the regular expression used during dependency scanning to match include files that should be followed.  See the include_regular_expression command.</para>
</sect2>
<sect2 id="cpack.prop_dir.INTERPROCEDURAL_OPTIMIZATION">
<title>INTERPROCEDURAL_OPTIMIZATION</title>
<abstract>
<para>Enable interprocedural optimization for targets in a directory.</para>
</abstract>
<para>If set to true, enables interprocedural optimizations if they are known to be supported by the compiler.</para>
</sect2>
<sect2 id="cpack.prop_dir.INTERPROCEDURAL_OPTIMIZATION__CONFIG_">
<title>INTERPROCEDURAL_OPTIMIZATION_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration interprocedural optimization for a directory.</para>
</abstract>
<para>This is a per-configuration version of INTERPROCEDURAL_OPTIMIZATION.  If set, this property overrides the generic property for the named configuration.</para>
</sect2>
<sect2 id="cpack.prop_dir.LINK_DIRECTORIES">
<title>LINK_DIRECTORIES</title>
<abstract>
<para>List of linker search directories.</para>
</abstract>
<para>This read-only property specifies the list of directories given so far to the link_directories command.  It is intended for debugging purposes.</para>
</sect2>
<sect2 id="cpack.prop_dir.LISTFILE_STACK">
<title>LISTFILE_STACK</title>
<abstract>
<para>The current stack of listfiles being processed.</para>
</abstract>
<para>This property is mainly useful when trying to debug errors in your CMake scripts. It returns a list of what list files are currently being processed, in order. So if one listfile does an INCLUDE command then that is effectively pushing the included listfile onto the stack.</para>
</sect2>
<sect2 id="cpack.prop_dir.MACROS">
<title>MACROS</title>
<abstract>
<para>List of macro commands available in the current directory.</para>
</abstract>
<para>This read-only property specifies the list of CMake macros currently defined.  It is intended for debugging purposes.  See the macro command.</para>
</sect2>
<sect2 id="cpack.prop_dir.PARENT_DIRECTORY">
<title>PARENT_DIRECTORY</title>
<abstract>
<para>Source directory that added current subdirectory.</para>
</abstract>
<para>This read-only property specifies the source directory that added the current source directory as a subdirectory of the build.  In the top-level directory the value is the empty-string.</para>
</sect2>
<sect2 id="cpack.prop_dir.RULE_LAUNCH_COMPILE">
<title>RULE_LAUNCH_COMPILE</title>
<abstract>
<para>Specify a launcher for compile rules.</para>
</abstract>
<para>See the global property of the same name for details.  This overrides the global property for a directory.</para>
</sect2>
<sect2 id="cpack.prop_dir.RULE_LAUNCH_CUSTOM">
<title>RULE_LAUNCH_CUSTOM</title>
<abstract>
<para>Specify a launcher for custom rules.</para>
</abstract>
<para>See the global property of the same name for details.  This overrides the global property for a directory.</para>
</sect2>
<sect2 id="cpack.prop_dir.RULE_LAUNCH_LINK">
<title>RULE_LAUNCH_LINK</title>
<abstract>
<para>Specify a launcher for link rules.</para>
</abstract>
<para>See the global property of the same name for details.  This overrides the global property for a directory.</para>
</sect2>
<sect2 id="cpack.prop_dir.TEST_INCLUDE_FILE">
<title>TEST_INCLUDE_FILE</title>
<abstract>
<para>A cmake file that will be included when ctest is run.</para>
</abstract>
<para>If you specify TEST_INCLUDE_FILE, that file will be included and processed when ctest is run on the directory.</para>
</sect2>
<sect2 id="cpack.prop_dir.VARIABLES">
<title>VARIABLES</title>
<abstract>
<para>List of variables defined in the current directory.</para>
</abstract>
<para>This read-only property specifies the list of CMake variables currently defined.  It is intended for debugging purposes.</para>
</sect2>
<sect2 id="cpack.prop_dir.VS_GLOBAL_SECTION_POST__section_">
<title>VS_GLOBAL_SECTION_POST_&lt;section&gt;</title>
<abstract>
<para>Specify a postSolution global section in Visual Studio.</para>
</abstract>
<para>Setting a property like this generates an entry of the following form in the solution file:
</para>
<para>
<programlisting>  GlobalSection(&lt;section&gt;) = postSolution
    &lt;contents based on property value&gt;
  EndGlobalSection
</programlisting>
</para>
<para>The property must be set to a semicolon-separated list of key=value pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped.
</para>
<para>This property only works for Visual Studio 7 and above; it is ignored on other generators. The property only applies when set on a directory whose CMakeLists.txt contains a project() command.
</para>
<para>Note that CMake generates postSolution sections ExtensibilityGlobals and ExtensibilityAddIns by default. If you set the corresponding property, it will override the default section. For example, setting VS_GLOBAL_SECTION_POST_ExtensibilityGlobals will override the default contents of the ExtensibilityGlobals section, while keeping ExtensibilityAddIns on its default.</para>
</sect2>
<sect2 id="cpack.prop_dir.VS_GLOBAL_SECTION_PRE__section_">
<title>VS_GLOBAL_SECTION_PRE_&lt;section&gt;</title>
<abstract>
<para>Specify a preSolution global section in Visual Studio.</para>
</abstract>
<para>Setting a property like this generates an entry of the following form in the solution file:
</para>
<para>
<programlisting>  GlobalSection(&lt;section&gt;) = preSolution
    &lt;contents based on property value&gt;
  EndGlobalSection
</programlisting>
</para>
<para>The property must be set to a semicolon-separated list of key=value pairs. Each such pair will be transformed into an entry in the solution global section. Whitespace around key and value is ignored. List elements which do not contain an equal sign are skipped.
</para>
<para>This property only works for Visual Studio 7 and above; it is ignored on other generators. The property only applies when set on a directory whose CMakeLists.txt contains a project() command.</para>
</sect2>
</sect1>
<sect1 id="cpack.Properties_on_Source_Files">
<title>Properties on Source Files</title>
<sect2 id="cpack.prop_sf.ABSTRACT">
<title>ABSTRACT</title>
<abstract>
<para>Is this source file an abstract class.</para>
</abstract>
<para>A property on a source file that indicates if the source file represents a class that is abstract. This only makes sense for languages that have a notion of an abstract class and it is only used by some tools that wrap classes into other languages.</para>
</sect2>
<sect2 id="cpack.prop_sf.COMPILE_DEFINITIONS">
<title>COMPILE_DEFINITIONS</title>
<abstract>
<para>Preprocessor definitions for compiling a source file.</para>
</abstract>
<para>The COMPILE_DEFINITIONS property may be set to a semicolon-separated list of preprocessor definitions using the syntax VAR or VAR=value.  Function-style definitions are not supported.  CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values).  This property may be set on a per-configuration basis using the name COMPILE_DEFINITIONS_&lt;CONFIG&gt; where &lt;CONFIG&gt; is an upper-case name (ex. "COMPILE_DEFINITIONS_DEBUG").
</para>
<para>CMake will automatically drop some definitions that are not supported by the native build tool.  The VS6 IDE does not support definition values with spaces (but NMake does).  Xcode does not support per-configuration definitions on source files.
</para>
<para>Disclaimer: Most native build tools have poor support for escaping certain values.  CMake has work-arounds for many cases but some values may just not be possible to pass correctly.  If a value does not seem to be escaped correctly, do not attempt to work-around the problem by adding escape sequences to the value.  Your work-around may break in a future version of CMake that has improved escape support.  Instead consider defining the macro in a (configured) header file.  Then report the limitation.  Known limitations include:
</para>
<para>
<programlisting>  #          - broken almost everywhere
  ;          - broken in VS IDE 7.0 and Borland Makefiles
  ,          - broken in VS IDE
  %          - broken in some cases in NMake
  &amp; |        - broken in some cases on MinGW
  ^ &lt; &gt; \"   - broken in most Make tools on Windows
</programlisting>
</para>
<para>CMake does not reject these values outright because they do work in some cases.  Use with caution.  </para>
</sect2>
<sect2 id="cpack.prop_sf.COMPILE_DEFINITIONS__CONFIG_">
<title>COMPILE_DEFINITIONS_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration preprocessor definitions on a source file.</para>
</abstract>
<para>This is the configuration-specific version of COMPILE_DEFINITIONS.  Note that Xcode does not support per-configuration source file flags so this property will be ignored by the Xcode generator.</para>
</sect2>
<sect2 id="cpack.prop_sf.COMPILE_FLAGS">
<title>COMPILE_FLAGS</title>
<abstract>
<para>Additional flags to be added when compiling this source file.</para>
</abstract>
<para>These flags will be added to the list of compile flags when this source file builds.  Use COMPILE_DEFINITIONS to pass additional preprocessor definitions.</para>
</sect2>
<sect2 id="cpack.prop_sf.EXTERNAL_OBJECT">
<title>EXTERNAL_OBJECT</title>
<abstract>
<para>If set to true then this is an object file.</para>
</abstract>
<para>If this property is set to true then the source file is really an object file and should not be compiled.  It will still be linked into the target though.</para>
</sect2>
<sect2 id="cpack.prop_sf.Fortran_FORMAT">
<title>Fortran_FORMAT</title>
<abstract>
<para>Set to FIXED or FREE to indicate the Fortran source layout.</para>
</abstract>
<para>This property tells CMake whether a given Fortran source file uses fixed-format or free-format.  CMake will pass the corresponding format flag to the compiler.  Consider using the target-wide Fortran_FORMAT property if all source files in a target share the same format.</para>
</sect2>
<sect2 id="cpack.prop_sf.GENERATED">
<title>GENERATED</title>
<abstract>
<para>Is this source file generated as part of the build process.</para>
</abstract>
<para>If a source file is generated by the build process CMake will handle it differently in terms of dependency checking etc. Otherwise having a non-existent source file could create problems.</para>
</sect2>
<sect2 id="cpack.prop_sf.HEADER_FILE_ONLY">
<title>HEADER_FILE_ONLY</title>
<abstract>
<para>Is this source file only a header file.</para>
</abstract>
<para>A property on a source file that indicates if the source file is a header file with no associated implementation. This is set automatically based on the file extension and is used by CMake to determine if certain dependency information should be computed.</para>
</sect2>
<sect2 id="cpack.prop_sf.KEEP_EXTENSION">
<title>KEEP_EXTENSION</title>
<abstract>
<para>Make the output file have the same extension as the source file.</para>
</abstract>
<para>If this property is set then the file extension of the output file will be the same as that of the source file. Normally the output file extension is computed based on the language of the source file, for example .cxx will go to a .o extension.</para>
</sect2>
<sect2 id="cpack.prop_sf.LABELS">
<title>LABELS</title>
<abstract>
<para>Specify a list of text labels associated with a source file.</para>
</abstract>
<para>This property has meaning only when the source file is listed in a target whose LABELS property is also set.  No other semantics are currently specified.</para>
</sect2>
<sect2 id="cpack.prop_sf.LANGUAGE">
<title>LANGUAGE</title>
<abstract>
<para>What programming language is the file.</para>
</abstract>
<para>A property that can be set to indicate what programming language the source file is. If it is not set the language is determined based on the file extension. Typical values are CXX C etc. Setting this property for a file means this file will be compiled. Do not set this for headers or files that should not be compiled.</para>
</sect2>
<sect2 id="cpack.prop_sf.LOCATION">
<title>LOCATION</title>
<abstract>
<para>The full path to a source file.</para>
</abstract>
<para>A read only property on a SOURCE FILE that contains the full path to the source file.</para>
</sect2>
<sect2 id="cpack.prop_sf.MACOSX_PACKAGE_LOCATION">
<title>MACOSX_PACKAGE_LOCATION</title>
<abstract>
<para>Place a source file inside a Mac OS X bundle, CFBundle, or framework.</para>
</abstract>
<para>Executable targets with the MACOSX_BUNDLE property set are built as Mac OS X application bundles on Apple platforms.  Shared library targets with the FRAMEWORK property set are built as Mac OS X frameworks on Apple platforms.  Module library targets with the BUNDLE property set are built as Mac OS X CFBundle bundles on Apple platforms.  Source files listed in the target with this property set will be copied to a directory inside the bundle or framework content folder specified by the property value.  For bundles the content folder is "&lt;name&gt;.app/Contents".  For frameworks the content folder is "&lt;name&gt;.framework/Versions/&lt;version&gt;".  For cfbundles the content folder is "&lt;name&gt;.bundle/Contents" (unless the extension is changed).  See the PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE target properties for specifying files meant for Headers, PrivateHeaders, or Resources directories.</para>
</sect2>
<sect2 id="cpack.prop_sf.OBJECT_DEPENDS">
<title>OBJECT_DEPENDS</title>
<abstract>
<para>Additional files on which a compiled object file depends.</para>
</abstract>
<para>Specifies a semicolon-separated list of full-paths to files on which any object files compiled from this source file depend.  An object file will be recompiled if any of the named files is newer than it.
</para>
<para>This property need not be used to specify the dependency of a source file on a generated header file that it includes.  Although the property was originally introduced for this purpose, it is no longer necessary.  If the generated header file is created by a custom command in the same target as the source file, the automatic dependency scanning process will recognize the dependency.  If the generated header file is created by another target, an inter-target dependency should be created with the add_dependencies command (if one does not already exist due to linking relationships).</para>
</sect2>
<sect2 id="cpack.prop_sf.OBJECT_OUTPUTS">
<title>OBJECT_OUTPUTS</title>
<abstract>
<para>Additional outputs for a Makefile rule.</para>
</abstract>
<para>Additional outputs created by compilation of this source file. If any of these outputs is missing the object will be recompiled. This is supported only on Makefile generators and will be ignored on other generators.</para>
</sect2>
<sect2 id="cpack.prop_sf.SYMBOLIC">
<title>SYMBOLIC</title>
<abstract>
<para>Is this just a name for a rule.</para>
</abstract>
<para>If SYMBOLIC (boolean) is set to true the build system will be informed that the source file is not actually created on disk but instead used as a symbolic name for a build rule.</para>
</sect2>
<sect2 id="cpack.prop_sf.WRAP_EXCLUDE">
<title>WRAP_EXCLUDE</title>
<abstract>
<para>Exclude this source file from any code wrapping techniques.</para>
</abstract>
<para>Some packages can wrap source files into alternate languages to provide additional functionality. For example, C++ code can be wrapped into Java or Python etc using SWIG etc. If WRAP_EXCLUDE is set to true (1 etc) that indicates that this source file should not be wrapped.</para>
</sect2>
</sect1>
<sect1 id="cpack.Properties_on_Targets">
<title>Properties on Targets</title>
<sect2 id="cpack.prop_tgt._CONFIG__OUTPUT_NAME">
<title>&lt;CONFIG&gt;_OUTPUT_NAME</title>
<abstract>
<para>Old per-configuration target file base name.</para>
</abstract>
<para>This is a configuration-specific version of OUTPUT_NAME.  Use OUTPUT_NAME_&lt;CONFIG&gt; instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt._CONFIG__POSTFIX">
<title>&lt;CONFIG&gt;_POSTFIX</title>
<abstract>
<para>Postfix to append to the target file name for configuration &lt;CONFIG&gt;.</para>
</abstract>
<para>When building with configuration &lt;CONFIG&gt; the value of this property is appended to the target file name built on disk.  For non-executable targets, this property is initialized by the value of the variable CMAKE_&lt;CONFIG&gt;_POSTFIX if it is set when a target is created.  This property is ignored on the Mac for Frameworks and App Bundles.</para>
</sect2>
<sect2 id="cpack.prop_tgt._LANG__VISIBILITY_PRESET">
<title>&lt;LANG&gt;_VISIBILITY_PRESET</title>
<abstract>
<para>Value for symbol visibility compile flags</para>
</abstract>
<para>The &lt;LANG&gt;_VISIBILITY_PRESET property determines the value passed in a visibility related compile option, such as -fvisibility= for &lt;LANG&gt;.  This property only has an affect for libraries and executables with exports.  This property is initialized by the value of the variable CMAKE_&lt;LANG&gt;_VISIBILITY_PRESET if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.ALIASED_TARGET">
<title>ALIASED_TARGET</title>
<abstract>
<para>Name of target aliased by this target.</para>
</abstract>
<para>If this is an ALIAS target, this property contains the name of the target aliased.</para>
</sect2>
<sect2 id="cpack.prop_tgt.ARCHIVE_OUTPUT_DIRECTORY">
<title>ARCHIVE_OUTPUT_DIRECTORY</title>
<abstract>
<para>Output directory in which to build ARCHIVE target files.</para>
</abstract>
<para>This property specifies the directory into which archive target files should be built. Multi-configuration generators (VS, Xcode) append a per-configuration subdirectory to the specified directory.  There are three kinds of target files that may be built: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms.  This property is initialized by the value of the variable CMAKE_ARCHIVE_OUTPUT_DIRECTORY if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.ARCHIVE_OUTPUT_DIRECTORY__CONFIG_">
<title>ARCHIVE_OUTPUT_DIRECTORY_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output directory for ARCHIVE target files.</para>
</abstract>
<para>This is a per-configuration version of ARCHIVE_OUTPUT_DIRECTORY, but multi-configuration generators (VS, Xcode) do NOT append a per-configuration subdirectory to the specified directory.  This property is initialized by the value of the variable CMAKE_ARCHIVE_OUTPUT_DIRECTORY_&lt;CONFIG&gt; if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.ARCHIVE_OUTPUT_NAME">
<title>ARCHIVE_OUTPUT_NAME</title>
<abstract>
<para>Output name for ARCHIVE target files.</para>
</abstract>
<para>This property specifies the base name for archive target files. It overrides OUTPUT_NAME and OUTPUT_NAME_&lt;CONFIG&gt; properties.  There are three kinds of target files that may be built: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms.</para>
</sect2>
<sect2 id="cpack.prop_tgt.ARCHIVE_OUTPUT_NAME__CONFIG_">
<title>ARCHIVE_OUTPUT_NAME_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output name for ARCHIVE target files.</para>
</abstract>
<para>This is the configuration-specific version of ARCHIVE_OUTPUT_NAME.</para>
</sect2>
<sect2 id="cpack.prop_tgt.AUTOMOC">
<title>AUTOMOC</title>
<abstract>
<para>Should the target be processed with automoc (for Qt projects).</para>
</abstract>
<para>AUTOMOC is a boolean specifying whether CMake will handle the Qt moc preprocessor automatically, i.e. without having to use the QT4_WRAP_CPP() or QT5_WRAP_CPP() macro. Currently Qt4 and Qt5 are supported.  When this property is set to TRUE, CMake will scan the source files at build time and invoke moc accordingly. If an #include statement like #include "moc_foo.cpp" is found, the Q_OBJECT class declaration is expected in the header, and moc is run on the header file. If an #include statement like #include "foo.moc" is found, then a Q_OBJECT is expected in the current source file and moc is run on the file itself. Additionally, all header files are parsed for Q_OBJECT macros, and if found, moc is also executed on those files. The resulting moc files, which are not included as shown above in any of the source files are included in a generated &lt;targetname&gt;_automoc.cpp file, which is compiled as part of the target.This property is initialized by the value of the variable CMAKE_AUTOMOC if it is set when a target is created.
</para>
<para>Additional command line options for moc can be set via the AUTOMOC_MOC_OPTIONS property.
</para>
<para>By setting the CMAKE_AUTOMOC_RELAXED_MODE variable to TRUE the rules for searching the files which will be processed by moc can be relaxed. See the documentation for this variable for more details.
</para>
<para>The global property AUTOMOC_TARGETS_FOLDER can be used to group the automoc targets together in an IDE, e.g. in MSVS.</para>
</sect2>
<sect2 id="cpack.prop_tgt.AUTOMOC_MOC_OPTIONS">
<title>AUTOMOC_MOC_OPTIONS</title>
<abstract>
<para>Additional options for moc when using automoc (see the AUTOMOC property)</para>
</abstract>
<para>This property is only used if the AUTOMOC property is set to TRUE for this target. In this case, it holds additional command line options which will be used when moc is executed during the build, i.e. it is equivalent to the optional OPTIONS argument of the qt4_wrap_cpp() macro.
</para>
<para>By default it is empty.</para>
</sect2>
<sect2 id="cpack.prop_tgt.BUILD_WITH_INSTALL_RPATH">
<title>BUILD_WITH_INSTALL_RPATH</title>
<abstract>
<para>Should build tree targets have install tree rpaths.</para>
</abstract>
<para>BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link the target in the build tree with the INSTALL_RPATH.  This takes precedence over SKIP_BUILD_RPATH and avoids the need for relinking before installation.  This property is initialized by the value of the variable CMAKE_BUILD_WITH_INSTALL_RPATH if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.BUNDLE">
<title>BUNDLE</title>
<abstract>
<para>This target is a CFBundle on the Mac.</para>
</abstract>
<para>If a module library target has this property set to true it will be built as a CFBundle when built on the mac. It will have the directory structure required for a CFBundle and will be suitable to be used for creating Browser Plugins or other application resources.</para>
</sect2>
<sect2 id="cpack.prop_tgt.BUNDLE_EXTENSION">
<title>BUNDLE_EXTENSION</title>
<abstract>
<para>The file extension used to name a BUNDLE target on the Mac.</para>
</abstract>
<para>The default value is "bundle" - you can also use "plugin" or whatever file extension is required by the host app for your bundle.</para>
</sect2>
<sect2 id="cpack.prop_tgt.COMPATIBLE_INTERFACE_BOOL">
<title>COMPATIBLE_INTERFACE_BOOL</title>
<abstract>
<para>Properties which must be compatible with their link interface</para>
</abstract>
<para>The COMPATIBLE_INTERFACE_BOOL property may contain a list of propertiesfor this target which must be consistent when evaluated as a boolean in the INTERFACE of all linked dependees.  For example, if a property "FOO" appears in the list, then for each dependee, the "INTERFACE_FOO" property content in all of its dependencies must be consistent with each other, and with the "FOO" property in the dependee.  Consistency in this sense has the meaning that if the property is set, then it must have the same boolean value as all others, and if the property is not set, then it is ignored.  Note that for each dependee, the set of properties from this property must not intersect with the set of properties from the COMPATIBLE_INTERFACE_STRING property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.COMPATIBLE_INTERFACE_STRING">
<title>COMPATIBLE_INTERFACE_STRING</title>
<abstract>
<para>Properties which must be string-compatible with their link interface</para>
</abstract>
<para>The COMPATIBLE_INTERFACE_STRING property may contain a list of properties for this target which must be the same when evaluated as a string in the INTERFACE of all linked dependees.  For example, if a property "FOO" appears in the list, then for each dependee, the "INTERFACE_FOO" property content in all of its dependencies must be equal with each other, and with the "FOO" property in the dependee.  If the property is not set, then it is ignored.  Note that for each dependee, the set of properties from this property must not intersect with the set of properties from the COMPATIBLE_INTERFACE_BOOL property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.COMPILE_DEFINITIONS">
<title>COMPILE_DEFINITIONS</title>
<abstract>
<para>Preprocessor definitions for compiling a target's sources.</para>
</abstract>
<para>The COMPILE_DEFINITIONS property may be set to a semicolon-separated list of preprocessor definitions using the syntax VAR or VAR=value.  Function-style definitions are not supported.  CMake will automatically escape the value correctly for the native build system (note that CMake language syntax may require escapes to specify some values).  This property may be set on a per-configuration basis using the name COMPILE_DEFINITIONS_&lt;CONFIG&gt; where &lt;CONFIG&gt; is an upper-case name (ex. "COMPILE_DEFINITIONS_DEBUG").
</para>
<para>CMake will automatically drop some definitions that are not supported by the native build tool.  The VS6 IDE does not support definition values with spaces (but NMake does).
</para>
<para>Contents of COMPILE_DEFINITIONS may use "generator expressions" with the syntax "$&lt;...&gt;".  Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
<para>Disclaimer: Most native build tools have poor support for escaping certain values.  CMake has work-arounds for many cases but some values may just not be possible to pass correctly.  If a value does not seem to be escaped correctly, do not attempt to work-around the problem by adding escape sequences to the value.  Your work-around may break in a future version of CMake that has improved escape support.  Instead consider defining the macro in a (configured) header file.  Then report the limitation.  Known limitations include:
</para>
<para>
<programlisting>  #          - broken almost everywhere
  ;          - broken in VS IDE 7.0 and Borland Makefiles
  ,          - broken in VS IDE
  %          - broken in some cases in NMake
  &amp; |        - broken in some cases on MinGW
  ^ &lt; &gt; \"   - broken in most Make tools on Windows
</programlisting>
</para>
<para>CMake does not reject these values outright because they do work in some cases.  Use with caution.  </para>
</sect2>
<sect2 id="cpack.prop_tgt.COMPILE_DEFINITIONS__CONFIG_">
<title>COMPILE_DEFINITIONS_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration preprocessor definitions on a target.</para>
</abstract>
<para>This is the configuration-specific version of COMPILE_DEFINITIONS.</para>
</sect2>
<sect2 id="cpack.prop_tgt.COMPILE_FLAGS">
<title>COMPILE_FLAGS</title>
<abstract>
<para>Additional flags to use when compiling this target's sources.</para>
</abstract>
<para>The COMPILE_FLAGS property sets additional compiler flags used to build sources within the target.  Use COMPILE_DEFINITIONS to pass additional preprocessor definitions.</para>
</sect2>
<sect2 id="cpack.prop_tgt.COMPILE_OPTIONS">
<title>COMPILE_OPTIONS</title>
<abstract>
<para>List of options to pass to the compiler.</para>
</abstract>
<para>This property specifies the list of options specified so far for this property.  This property exists on directories and targets.
</para>
<para>The target property values are used by the generators to set the options for the compiler.
</para>
<para>Contents of COMPILE_OPTIONS may use "generator expressions" with the syntax "$&lt;...&gt;".  Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.DEBUG_POSTFIX">
<title>DEBUG_POSTFIX</title>
<abstract>
<para>See target property &lt;CONFIG&gt;_POSTFIX.</para>
</abstract>
<para>This property is a special case of the more-general &lt;CONFIG&gt;_POSTFIX property for the DEBUG configuration.</para>
</sect2>
<sect2 id="cpack.prop_tgt.DEFINE_SYMBOL">
<title>DEFINE_SYMBOL</title>
<abstract>
<para>Define a symbol when compiling this target's sources.</para>
</abstract>
<para>DEFINE_SYMBOL sets the name of the preprocessor symbol defined when compiling sources in a shared library. If not set here then it is set to target_EXPORTS by default (with some substitutions if the target is not a valid C identifier). This is useful for headers to know whether they are being included from inside their library or outside to properly setup dllexport/dllimport decorations. </para>
</sect2>
<sect2 id="cpack.prop_tgt.ENABLE_EXPORTS">
<title>ENABLE_EXPORTS</title>
<abstract>
<para>Specify whether an executable exports symbols for loadable modules.</para>
</abstract>
<para>Normally an executable does not export any symbols because it is the final program.  It is possible for an executable to export symbols to be used by loadable modules.  When this property is set to true CMake will allow other targets to "link" to the executable with the TARGET_LINK_LIBRARIES command.  On all platforms a target-level dependency on the executable is created for targets that link to it.  For DLL platforms an import library will be created for the exported symbols and then used for linking.  All Windows-based systems including Cygwin are DLL platforms.  For non-DLL platforms that require all symbols to be resolved at link time, such as Mac OS X, the module will "link" to the executable using a flag like "-bundle_loader".  For other non-DLL platforms the link rule is simply ignored since the dynamic loader will automatically bind symbols when the module is loaded.  </para>
</sect2>
<sect2 id="cpack.prop_tgt.EXCLUDE_FROM_ALL">
<title>EXCLUDE_FROM_ALL</title>
<abstract>
<para>Exclude the target from the all target.</para>
</abstract>
<para>A property on a target that indicates if the target is excluded from the default build target. If it is not, then with a Makefile for example typing make will cause this target to be built. The same concept applies to the default build of other generators. Installing a target with EXCLUDE_FROM_ALL set to true has undefined behavior.</para>
</sect2>
<sect2 id="cpack.prop_tgt.EXCLUDE_FROM_DEFAULT_BUILD">
<title>EXCLUDE_FROM_DEFAULT_BUILD</title>
<abstract>
<para>Exclude target from "Build Solution".</para>
</abstract>
<para>This property is only used by Visual Studio generators 7 and above. When set to TRUE, the target will not be built when you press "Build Solution".</para>
</sect2>
<sect2 id="cpack.prop_tgt.EXCLUDE_FROM_DEFAULT_BUILD__CONFIG_">
<title>EXCLUDE_FROM_DEFAULT_BUILD_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration version of target exclusion from "Build Solution". </para>
</abstract>
<para>This is the configuration-specific version of EXCLUDE_FROM_DEFAULT_BUILD. If the generic EXCLUDE_FROM_DEFAULT_BUILD is also set on a target, EXCLUDE_FROM_DEFAULT_BUILD_&lt;CONFIG&gt; takes precedence in configurations for which it has a value.</para>
</sect2>
<sect2 id="cpack.prop_tgt.EXPORT_NAME">
<title>EXPORT_NAME</title>
<abstract>
<para>Exported name for target files.</para>
</abstract>
<para>This sets the name for the IMPORTED target generated when it this target is is exported.  If not set, the logical target name is used by default.</para>
</sect2>
<sect2 id="cpack.prop_tgt.EchoString">
<title>EchoString</title>
<abstract>
<para>A message to be displayed when the target is built.</para>
</abstract>
<para>A message to display on some generators (such as makefiles) when the target is built.</para>
</sect2>
<sect2 id="cpack.prop_tgt.FOLDER">
<title>FOLDER</title>
<abstract>
<para>Set the folder name. Use to organize targets in an IDE.</para>
</abstract>
<para>Targets with no FOLDER property will appear as top level entities in IDEs like Visual Studio. Targets with the same FOLDER property value will appear next to each other in a folder of that name. To nest folders, use FOLDER values such as 'GUI/Dialogs' with '/' characters separating folder levels.</para>
</sect2>
<sect2 id="cpack.prop_tgt.FRAMEWORK">
<title>FRAMEWORK</title>
<abstract>
<para>This target is a framework on the Mac.</para>
</abstract>
<para>If a shared library target has this property set to true it will be built as a framework when built on the mac. It will have the directory structure required for a framework and will be suitable to be used with the -framework option</para>
</sect2>
<sect2 id="cpack.prop_tgt.Fortran_FORMAT">
<title>Fortran_FORMAT</title>
<abstract>
<para>Set to FIXED or FREE to indicate the Fortran source layout.</para>
</abstract>
<para>This property tells CMake whether the Fortran source files in a target use fixed-format or free-format.  CMake will pass the corresponding format flag to the compiler.  Use the source-specific Fortran_FORMAT property to change the format of a specific source file.  If the variable CMAKE_Fortran_FORMAT is set when a target is created its value is used to initialize this property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.Fortran_MODULE_DIRECTORY">
<title>Fortran_MODULE_DIRECTORY</title>
<abstract>
<para>Specify output directory for Fortran modules provided by the target.</para>
</abstract>
<para>If the target contains Fortran source files that provide modules and the compiler supports a module output directory this specifies the directory in which the modules will be placed.  When this property is not set the modules will be placed in the build directory corresponding to the target's source directory.  If the variable CMAKE_Fortran_MODULE_DIRECTORY is set when a target is created its value is used to initialize this property.
</para>
<para>Note that some compilers will automatically search the module output directory for modules USEd during compilation but others will not.  If your sources USE modules their location must be specified by INCLUDE_DIRECTORIES regardless of this property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.GENERATOR_FILE_NAME">
<title>GENERATOR_FILE_NAME</title>
<abstract>
<para>Generator's file for this target.</para>
</abstract>
<para>An internal property used by some generators to record the name of the project or dsp file associated with this target. Note that at configure time, this property is only set for targets created by include_external_msproject().</para>
</sect2>
<sect2 id="cpack.prop_tgt.GNUtoMS">
<title>GNUtoMS</title>
<abstract>
<para>Convert GNU import library (.dll.a) to MS format (.lib).</para>
</abstract>
<para>When linking a shared library or executable that exports symbols using GNU tools on Windows (MinGW/MSYS) with Visual Studio installed convert the import library (.dll.a) from GNU to MS format (.lib).  Both import libraries will be installed by install(TARGETS) and exported by install(EXPORT) and export() to be linked by applications with either GNU- or MS-compatible tools.
</para>
<para>If the variable CMAKE_GNUtoMS is set when a target is created its value is used to initialize this property.  The variable must be set prior to the first command that enables a language such as project() or enable_language().  CMake provides the variable as an option to the user automatically when configuring on Windows with GNU tools.</para>
</sect2>
<sect2 id="cpack.prop_tgt.HAS_CXX">
<title>HAS_CXX</title>
<abstract>
<para>Link the target using the C++ linker tool (obsolete).</para>
</abstract>
<para>This is equivalent to setting the LINKER_LANGUAGE property to CXX.  See that property's documentation for details.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPLICIT_DEPENDS_INCLUDE_TRANSFORM">
<title>IMPLICIT_DEPENDS_INCLUDE_TRANSFORM</title>
<abstract>
<para>Specify #include line transforms for dependencies in a target.</para>
</abstract>
<para>This property specifies rules to transform macro-like #include lines during implicit dependency scanning of C and C++ source files.  The list of rules must be semicolon-separated with each entry of the form "A_MACRO(%)=value-with-%" (the % must be literal).  During dependency scanning occurrences of A_MACRO(...) on #include lines will be replaced by the value given with the macro argument substituted for '%'.  For example, the entry
</para>
<para>
<programlisting>  MYDIR(%)=&lt;mydir/%&gt;
</programlisting>
</para>
<para>will convert lines of the form
</para>
<para>
<programlisting>  #include MYDIR(myheader.h)
</programlisting>
</para>
<para>to
</para>
<para>
<programlisting>  #include &lt;mydir/myheader.h&gt;
</programlisting>
</para>
<para>allowing the dependency to be followed.
</para>
<para>This property applies to sources in the target on which it is set.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED">
<title>IMPORTED</title>
<abstract>
<para>Read-only indication of whether a target is IMPORTED.</para>
</abstract>
<para>The boolean value of this property is true for targets created with the IMPORTED option to add_executable or add_library.  It is false for targets built within the project.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_CONFIGURATIONS">
<title>IMPORTED_CONFIGURATIONS</title>
<abstract>
<para>Configurations provided for an IMPORTED target.</para>
</abstract>
<para>Set this to the list of configuration names available for an IMPORTED target.  The names correspond to configurations defined in the project from which the target is imported.  If the importing project uses a different set of configurations the names may be mapped using the MAP_IMPORTED_CONFIG_&lt;CONFIG&gt; property.  Ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_IMPLIB">
<title>IMPORTED_IMPLIB</title>
<abstract>
<para>Full path to the import library for an IMPORTED target.</para>
</abstract>
<para>Set this to the location of the ".lib" part of a windows DLL.  Ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_IMPLIB__CONFIG_">
<title>IMPORTED_IMPLIB_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_IMPLIB property.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_DEPENDENT_LIBRARIES">
<title>IMPORTED_LINK_DEPENDENT_LIBRARIES</title>
<abstract>
<para>Dependent shared libraries of an imported shared library.</para>
</abstract>
<para>Shared libraries may be linked to other shared libraries as part of their implementation.  On some platforms the linker searches for the dependent libraries of shared libraries they are including in the link.  Set this property to the list of dependent shared libraries of an imported library.  The list should be disjoint from the list of interface libraries in the INTERFACE_LINK_LIBRARIES property.  On platforms requiring dependent shared libraries to be found at link time CMake uses this list to add appropriate files or paths to the link command line.  Ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_DEPENDENT_LIBRARIES__CONFIG_">
<title>IMPORTED_LINK_DEPENDENT_LIBRARIES_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_LINK_DEPENDENT_LIBRARIES.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.  If set, this property completely overrides the generic property for the named configuration.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_INTERFACE_LANGUAGES">
<title>IMPORTED_LINK_INTERFACE_LANGUAGES</title>
<abstract>
<para>Languages compiled into an IMPORTED static library.</para>
</abstract>
<para>Set this to the list of languages of source files compiled to produce a STATIC IMPORTED library (such as "C" or "CXX").  CMake accounts for these languages when computing how to link a target to the imported library.  For example, when a C executable links to an imported C++ static library CMake chooses the C++ linker to satisfy language runtime dependencies of the static library.  
</para>
<para>This property is ignored for targets that are not STATIC libraries.  This property is ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_INTERFACE_LANGUAGES__CONFIG_">
<title>IMPORTED_LINK_INTERFACE_LANGUAGES_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_LINK_INTERFACE_LANGUAGES.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.  If set, this property completely overrides the generic property for the named configuration.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_INTERFACE_LIBRARIES">
<title>IMPORTED_LINK_INTERFACE_LIBRARIES</title>
<abstract>
<para>Transitive link interface of an IMPORTED target.</para>
</abstract>
<para>Set this to the list of libraries whose interface is included when an IMPORTED library target is linked to another target.  The libraries will be included on the link line for the target.  Unlike the LINK_INTERFACE_LIBRARIES property, this property applies to all imported target types, including STATIC libraries.  This property is ignored for non-imported targets.
</para>
<para>This property is ignored if the target also has a non-empty INTERFACE_LINK_LIBRARIES property.
</para>
<para>This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_INTERFACE_LIBRARIES__CONFIG_">
<title>IMPORTED_LINK_INTERFACE_LIBRARIES_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_LINK_INTERFACE_LIBRARIES.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.  If set, this property completely overrides the generic property for the named configuration.
</para>
<para>This property is ignored if the target also has a non-empty INTERFACE_LINK_LIBRARIES property.
</para>
<para>This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_INTERFACE_MULTIPLICITY">
<title>IMPORTED_LINK_INTERFACE_MULTIPLICITY</title>
<abstract>
<para>Repetition count for cycles of IMPORTED static libraries.</para>
</abstract>
<para>This is LINK_INTERFACE_MULTIPLICITY for IMPORTED targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LINK_INTERFACE_MULTIPLICITY__CONFIG_">
<title>IMPORTED_LINK_INTERFACE_MULTIPLICITY_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_LINK_INTERFACE_MULTIPLICITY.</para>
</abstract>
<para>If set, this property completely overrides the generic property for the named configuration.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LOCATION">
<title>IMPORTED_LOCATION</title>
<abstract>
<para>Full path to the main file on disk for an IMPORTED target.</para>
</abstract>
<para>Set this to the location of an IMPORTED target file on disk.  For executables this is the location of the executable file.  For bundles on OS X this is the location of the executable file inside Contents/MacOS under the application bundle folder.  For static libraries and modules this is the location of the library or module.  For shared libraries on non-DLL platforms this is the location of the shared library.  For frameworks on OS X this is the location of the library file symlink just inside the framework folder.  For DLLs this is the location of the ".dll" part of the library.  For UNKNOWN libraries this is the location of the file to be linked.  Ignored for non-imported targets.
</para>
<para>Projects may skip IMPORTED_LOCATION if the configuration-specific property IMPORTED_LOCATION_&lt;CONFIG&gt; is set.  To get the location of an imported target read one of the LOCATION or LOCATION_&lt;CONFIG&gt; properties.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_LOCATION__CONFIG_">
<title>IMPORTED_LOCATION_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_LOCATION property.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_NO_SONAME">
<title>IMPORTED_NO_SONAME</title>
<abstract>
<para>Specifies that an IMPORTED shared library target has no "soname".  </para>
</abstract>
<para>Set this property to true for an imported shared library file that has no "soname" field.  CMake may adjust generated link commands for some platforms to prevent the linker from using the path to the library in place of its missing soname.  Ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_NO_SONAME__CONFIG_">
<title>IMPORTED_NO_SONAME_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_NO_SONAME property.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_SONAME">
<title>IMPORTED_SONAME</title>
<abstract>
<para>The "soname" of an IMPORTED target of shared library type.</para>
</abstract>
<para>Set this to the "soname" embedded in an imported shared library.  This is meaningful only on platforms supporting the feature.  Ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORTED_SONAME__CONFIG_">
<title>IMPORTED_SONAME_&lt;CONFIG&gt;</title>
<abstract>
<para>&lt;CONFIG&gt;-specific version of IMPORTED_SONAME property.</para>
</abstract>
<para>Configuration names correspond to those provided by the project from which the target is imported.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORT_PREFIX">
<title>IMPORT_PREFIX</title>
<abstract>
<para>What comes before the import library name.</para>
</abstract>
<para>Similar to the target property PREFIX, but used for import libraries (typically corresponding to a DLL) instead of regular libraries. A target property that can be set to override the prefix (such as "lib") on an import library name.</para>
</sect2>
<sect2 id="cpack.prop_tgt.IMPORT_SUFFIX">
<title>IMPORT_SUFFIX</title>
<abstract>
<para>What comes after the import library name.</para>
</abstract>
<para>Similar to the target property SUFFIX, but used for import libraries (typically corresponding to a DLL) instead of regular libraries. A target property that can be set to override the suffix (such as ".lib") on an import library name.</para>
</sect2>
<sect2 id="cpack.prop_tgt.INCLUDE_DIRECTORIES">
<title>INCLUDE_DIRECTORIES</title>
<abstract>
<para>List of preprocessor include file search directories.</para>
</abstract>
<para>This property specifies the list of directories given so far to the include_directories command. This property exists on directories and targets. In addition to accepting values from the include_directories command, values may be set directly on any directory or any target using the set_property command. A target gets its initial value for this property from the value of the directory property. A directory gets its initial value from its parent directory if it has one. Both directory and target property values are adjusted by calls to the include_directories command.
</para>
<para>The target property values are used by the generators to set the include paths for the compiler.  See also the include_directories command.
</para>
<para>Contents of INCLUDE_DIRECTORIES may use "generator expressions" with the syntax "$&lt;...&gt;".  Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.INSTALL_NAME_DIR">
<title>INSTALL_NAME_DIR</title>
<abstract>
<para>Mac OSX directory name for installed targets.</para>
</abstract>
<para>INSTALL_NAME_DIR is a string specifying the directory portion of the "install_name" field of shared libraries on Mac OSX to use in the installed targets. </para>
</sect2>
<sect2 id="cpack.prop_tgt.INSTALL_RPATH">
<title>INSTALL_RPATH</title>
<abstract>
<para>The rpath to use for installed targets.</para>
</abstract>
<para>A semicolon-separated list specifying the rpath to use in installed targets (for platforms that support it).  This property is initialized by the value of the variable CMAKE_INSTALL_RPATH if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.INSTALL_RPATH_USE_LINK_PATH">
<title>INSTALL_RPATH_USE_LINK_PATH</title>
<abstract>
<para>Add paths to linker search and installed rpath.</para>
</abstract>
<para>INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true will append directories in the linker search path and outside the project to the INSTALL_RPATH.  This property is initialized by the value of the variable CMAKE_INSTALL_RPATH_USE_LINK_PATH if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERFACE_COMPILE_DEFINITIONS">
<title>INTERFACE_COMPILE_DEFINITIONS</title>
<abstract>
<para>List of public compile definitions for a library.</para>
</abstract>
<para>Targets may populate this property to publish the compile definitions required to compile against the headers for the target.  Consuming targets can add entries to their own COMPILE_DEFINITIONS property such as $&lt;TARGET_PROPERTY:foo,INTERFACE_COMPILE_DEFINITIONS&gt; to use the compile definitions specified in the interface of 'foo'.
</para>
<para>Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERFACE_COMPILE_OPTIONS">
<title>INTERFACE_COMPILE_OPTIONS</title>
<abstract>
<para>List of interface options to pass to the compiler.</para>
</abstract>
<para>Targets may populate this property to publish the compile options required to compile against the headers for the target.  Consuming targets can add entries to their own COMPILE_OPTIONS property such as $&lt;TARGET_PROPERTY:foo,INTERFACE_COMPILE_OPTIONS&gt; to use the compile options specified in the interface of 'foo'.
</para>
<para>Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERFACE_INCLUDE_DIRECTORIES">
<title>INTERFACE_INCLUDE_DIRECTORIES</title>
<abstract>
<para>List of public include directories for a library.</para>
</abstract>
<para>Targets may populate this property to publish the include directories required to compile against the headers for the target.  Consuming targets can add entries to their own INCLUDE_DIRECTORIES property such as $&lt;TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES&gt; to use the include directories specified in the interface of 'foo'.
</para>
<para>Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERFACE_LINK_LIBRARIES">
<title>INTERFACE_LINK_LIBRARIES</title>
<abstract>
<para>List public interface libraries for a library.</para>
</abstract>
<para>This property contains the list of transitive link dependencies.  When the target is linked into another target the libraries listed (and recursively their link interface libraries) will be provided to the other target also.  This property is overridden by the LINK_INTERFACE_LIBRARIES or LINK_INTERFACE_LIBRARIES_&lt;CONFIG&gt; property if policy CMP0022 is OLD or unset.
</para>
<para>
</para>
<para>Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERFACE_POSITION_INDEPENDENT_CODE">
<title>INTERFACE_POSITION_INDEPENDENT_CODE</title>
<abstract>
<para>Whether consumers need to create a position-independent target</para>
</abstract>
<para>The INTERFACE_POSITION_INDEPENDENT_CODE property informs consumers of this target whether they must set their POSITION_INDEPENDENT_CODE property to ON.  If this property is set to ON, then the POSITION_INDEPENDENT_CODE property on all consumers will be set to ON.  Similarly, if this property is set to OFF, then the POSITION_INDEPENDENT_CODE property on all consumers will be set to OFF.  If this property is undefined, then consumers will determine their POSITION_INDEPENDENT_CODE property by other means.  Consumers must ensure that the targets that they link to have a consistent requirement for their INTERFACE_POSITION_INDEPENDENT_CODE property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERFACE_SYSTEM_INCLUDE_DIRECTORIES">
<title>INTERFACE_SYSTEM_INCLUDE_DIRECTORIES</title>
<abstract>
<para>List of public system include directories for a library.</para>
</abstract>
<para>Targets may populate this property to publish the include directories which contain system headers, and therefore should not result in compiler warnings.  Consuming targets will then mark the same include directories as system headers.
</para>
<para>Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERPROCEDURAL_OPTIMIZATION">
<title>INTERPROCEDURAL_OPTIMIZATION</title>
<abstract>
<para>Enable interprocedural optimization for a target.</para>
</abstract>
<para>If set to true, enables interprocedural optimizations if they are known to be supported by the compiler.</para>
</sect2>
<sect2 id="cpack.prop_tgt.INTERPROCEDURAL_OPTIMIZATION__CONFIG_">
<title>INTERPROCEDURAL_OPTIMIZATION_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration interprocedural optimization for a target.</para>
</abstract>
<para>This is a per-configuration version of INTERPROCEDURAL_OPTIMIZATION.  If set, this property overrides the generic property for the named configuration.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LABELS">
<title>LABELS</title>
<abstract>
<para>Specify a list of text labels associated with a target.</para>
</abstract>
<para>Target label semantics are currently unspecified.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LIBRARY_OUTPUT_DIRECTORY">
<title>LIBRARY_OUTPUT_DIRECTORY</title>
<abstract>
<para>Output directory in which to build LIBRARY target files.</para>
</abstract>
<para>This property specifies the directory into which library target files should be built. Multi-configuration generators (VS, Xcode) append a per-configuration subdirectory to the specified directory.  There are three kinds of target files that may be built: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms.  This property is initialized by the value of the variable CMAKE_LIBRARY_OUTPUT_DIRECTORY if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LIBRARY_OUTPUT_DIRECTORY__CONFIG_">
<title>LIBRARY_OUTPUT_DIRECTORY_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output directory for LIBRARY target files.</para>
</abstract>
<para>This is a per-configuration version of LIBRARY_OUTPUT_DIRECTORY, but multi-configuration generators (VS, Xcode) do NOT append a per-configuration subdirectory to the specified directory.  This property is initialized by the value of the variable CMAKE_LIBRARY_OUTPUT_DIRECTORY_&lt;CONFIG&gt; if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LIBRARY_OUTPUT_NAME">
<title>LIBRARY_OUTPUT_NAME</title>
<abstract>
<para>Output name for LIBRARY target files.</para>
</abstract>
<para>This property specifies the base name for library target files. It overrides OUTPUT_NAME and OUTPUT_NAME_&lt;CONFIG&gt; properties.  There are three kinds of target files that may be built: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LIBRARY_OUTPUT_NAME__CONFIG_">
<title>LIBRARY_OUTPUT_NAME_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output name for LIBRARY target files.</para>
</abstract>
<para>This is the configuration-specific version of LIBRARY_OUTPUT_NAME.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINKER_LANGUAGE">
<title>LINKER_LANGUAGE</title>
<abstract>
<para>Specifies language whose compiler will invoke the linker.</para>
</abstract>
<para>For executables, shared libraries, and modules, this sets the language whose compiler is used to link the target (such as "C" or "CXX").  A typical value for an executable is the language of the source file providing the program entry point (main).  If not set, the language with the highest linker preference value is the default.  See documentation of CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE variables.
</para>
<para>If this property is not set by the user, it will be calculated at generate-time by CMake.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_DEPENDS">
<title>LINK_DEPENDS</title>
<abstract>
<para>Additional files on which a target binary depends for linking.</para>
</abstract>
<para>Specifies a semicolon-separated list of full-paths to files on which the link rule for this target depends.  The target binary will be linked if any of the named files is newer than it.
</para>
<para>This property is ignored by non-Makefile generators.  It is intended to specify dependencies on "linker scripts" for custom Makefile link rules.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_DEPENDS_NO_SHARED">
<title>LINK_DEPENDS_NO_SHARED</title>
<abstract>
<para>Do not depend on linked shared library files.</para>
</abstract>
<para>Set this property to true to tell CMake generators not to add file-level dependencies on the shared library files linked by this target.  Modification to the shared libraries will not be sufficient to re-link this target.  Logical target-level dependencies will not be affected so the linked shared libraries will still be brought up to date before this target is built.
</para>
<para>This property is initialized by the value of the variable CMAKE_LINK_DEPENDS_NO_SHARED if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_FLAGS">
<title>LINK_FLAGS</title>
<abstract>
<para>Additional flags to use when linking this target.</para>
</abstract>
<para>The LINK_FLAGS property can be used to add extra flags to the link step of a target. LINK_FLAGS_&lt;CONFIG&gt; will add to the configuration &lt;CONFIG&gt;, for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO. </para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_FLAGS__CONFIG_">
<title>LINK_FLAGS_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration linker flags for a target.</para>
</abstract>
<para>This is the configuration-specific version of LINK_FLAGS.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_INTERFACE_LIBRARIES">
<title>LINK_INTERFACE_LIBRARIES</title>
<abstract>
<para>List public interface libraries for a shared library or executable.</para>
</abstract>
<para>By default linking to a shared library target transitively links to targets with which the library itself was linked.  For an executable with exports (see the ENABLE_EXPORTS property) no default transitive link dependencies are used.  This property replaces the default transitive link dependencies with an explicit list.  When the target is linked into another target the libraries listed (and recursively their link interface libraries) will be provided to the other target also.  If the list is empty then no transitive link dependencies will be incorporated when this target is linked into another target even if the default set is non-empty.  This property is initialized by the value of the variable CMAKE_LINK_INTERFACE_LIBRARIES if it is set when a target is created.  This property is ignored for STATIC libraries.
</para>
<para>This property is overridden by the INTERFACE_LINK_LIBRARIES property if policy CMP0022 is NEW.
</para>
<para>This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_INTERFACE_LIBRARIES__CONFIG_">
<title>LINK_INTERFACE_LIBRARIES_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration list of public interface libraries for a target.</para>
</abstract>
<para>This is the configuration-specific version of LINK_INTERFACE_LIBRARIES.  If set, this property completely overrides the generic property for the named configuration.
</para>
<para>This property is overridden by the INTERFACE_LINK_LIBRARIES property if policy CMP0022 is NEW.
</para>
<para>This property is deprecated. Use INTERFACE_LINK_LIBRARIES instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_INTERFACE_MULTIPLICITY">
<title>LINK_INTERFACE_MULTIPLICITY</title>
<abstract>
<para>Repetition count for STATIC libraries with cyclic dependencies.</para>
</abstract>
<para>When linking to a STATIC library target with cyclic dependencies the linker may need to scan more than once through the archives in the strongly connected component of the dependency graph.  CMake by default constructs the link line so that the linker will scan through the component at least twice.  This property specifies the minimum number of scans if it is larger than the default.  CMake uses the largest value specified by any target in a component.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_INTERFACE_MULTIPLICITY__CONFIG_">
<title>LINK_INTERFACE_MULTIPLICITY_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration repetition count for cycles of STATIC libraries.</para>
</abstract>
<para>This is the configuration-specific version of LINK_INTERFACE_MULTIPLICITY.  If set, this property completely overrides the generic property for the named configuration.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_LIBRARIES">
<title>LINK_LIBRARIES</title>
<abstract>
<para>List of direct link dependencies.</para>
</abstract>
<para>This property specifies the list of libraries or targets which will be used for linking. In addition to accepting values from the target_link_libraries command, values may be set directly on any target using the set_property command. 
</para>
<para>The target property values are used by the generators to set the link libraries for the compiler.  See also the target_link_libraries command.
</para>
<para>Contents of LINK_LIBRARIES may use "generator expressions" with the syntax "$&lt;...&gt;".  Generator expressions are evaluated during build system generation to produce information specific to each build configuration.  Valid expressions are:
</para>
<para>
<programlisting>  $&lt;0:...&gt;                  = empty string (ignores "...")
  $&lt;1:...&gt;                  = content of "..."
  $&lt;CONFIG:cfg&gt;             = '1' if config is "cfg", else '0'
  $&lt;CONFIGURATION&gt;          = configuration name
  $&lt;BOOL:...&gt;               = '1' if the '...' is true, else '0'
  $&lt;STREQUAL:a,b&gt;           = '1' if a is STREQUAL b, else '0'
  $&lt;ANGLE-R&gt;                = A literal '&gt;'. Used to compare strings which contain a '&gt;' for example.
  $&lt;COMMA&gt;                  = A literal ','. Used to compare strings which contain a ',' for example.
  $&lt;SEMICOLON&gt;              = A literal ';'. Used to prevent list expansion on an argument with ';'.
  $&lt;JOIN:list,...&gt;          = joins the list with the content of "..."
  $&lt;TARGET_NAME:...&gt;        = Marks ... as being the name of a target.  This is required if exporting targets to multiple dependent export sets.  The '...' must be a literal name of a target- it may not contain generator expressions.
  $&lt;INSTALL_INTERFACE:...&gt;  = content of "..." when the property is exported using install(EXPORT), and empty otherwise.
  $&lt;BUILD_INTERFACE:...&gt;    = content of "..." when the property is exported using export(), or when the target is used by another target in the same buildsystem. Expands to the empty string otherwise.
  $&lt;C_COMPILER_ID&gt;          = The CMake-id of the C compiler used.
  $&lt;C_COMPILER_ID:comp&gt;     = '1' if the CMake-id of the C compiler matches comp, otherwise '0'.
  $&lt;CXX_COMPILER_ID&gt;        = The CMake-id of the CXX compiler used.
  $&lt;CXX_COMPILER_ID:comp&gt;   = '1' if the CMake-id of the CXX compiler matches comp, otherwise '0'.
  $&lt;VERSION_GREATER:v1,v2&gt;  = '1' if v1 is a version greater than v2, else '0'.
  $&lt;VERSION_LESS:v1,v2&gt;     = '1' if v1 is a version less than v2, else '0'.
  $&lt;VERSION_EQUAL:v1,v2&gt;    = '1' if v1 is the same version as v2, else '0'.
  $&lt;C_COMPILER_VERSION&gt;     = The version of the C compiler used.
  $&lt;C_COMPILER_VERSION:ver&gt; = '1' if the version of the C compiler matches ver, otherwise '0'.
  $&lt;CXX_COMPILER_VERSION&gt;   = The version of the CXX compiler used.
  $&lt;CXX_COMPILER_VERSION:ver&gt; = '1' if the version of the CXX compiler matches ver, otherwise '0'.
  $&lt;TARGET_FILE:tgt&gt;        = main file (.exe, .so.1.2, .a)
  $&lt;TARGET_LINKER_FILE:tgt&gt; = file used to link (.a, .lib, .so)
  $&lt;TARGET_SONAME_FILE:tgt&gt; = file with soname (.so.3)
</programlisting>
</para>
<para>where "tgt" is the name of a target.  Target file expressions produce a full path, but _DIR and _NAME versions can produce the directory and file name components:
</para>
<para>
<programlisting>  $&lt;TARGET_FILE_DIR:tgt&gt;/$&lt;TARGET_FILE_NAME:tgt&gt;
  $&lt;TARGET_LINKER_FILE_DIR:tgt&gt;/$&lt;TARGET_LINKER_FILE_NAME:tgt&gt;
  $&lt;TARGET_SONAME_FILE_DIR:tgt&gt;/$&lt;TARGET_SONAME_FILE_NAME:tgt&gt;
</programlisting>
</para>
<para>
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:tgt,prop&gt;   = The value of the property prop on the target tgt.
</programlisting>
</para>
<para>Note that tgt is not added as a dependency of the target this expression is evaluated on.
</para>
<para>
<programlisting>  $&lt;TARGET_POLICY:pol&gt;          = '1' if the policy was NEW when the 'head' target was created, else '0'.  If the policy was not set, the warning message for the policy will be emitted.  This generator expression only works for a subset of policies.
  $&lt;INSTALL_PREFIX&gt;         = Content of the install prefix when the target is exported via INSTALL(EXPORT) and empty otherwise.
</programlisting>
</para>
<para>Boolean expressions:
</para>
<para>
<programlisting>  $&lt;AND:?[,?]...&gt;           = '1' if all '?' are '1', else '0'
  $&lt;OR:?[,?]...&gt;            = '0' if all '?' are '0', else '1'
  $&lt;NOT:?&gt;                  = '0' if '?' is '1', else '1'
</programlisting>
</para>
<para>where '?' is always either '0' or '1'.
</para>
<para>Expressions with an implicit 'this' target:
</para>
<para>
<programlisting>  $&lt;TARGET_PROPERTY:prop&gt;   = The value of the property prop on the target on which the generator expression is evaluated.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_SEARCH_END_STATIC">
<title>LINK_SEARCH_END_STATIC</title>
<abstract>
<para>End a link line such that static system libraries are used.</para>
</abstract>
<para>Some linkers support switches such as -Bstatic and -Bdynamic to determine whether to use static or shared libraries for -lXXX options.  CMake uses these options to set the link type for libraries whose full paths are not known or (in some cases) are in implicit link directories for the platform.  By default CMake adds an option at the end of the library list (if necessary) to set the linker search type back to its starting type.  This property switches the final linker search type to -Bstatic regardless of how it started.  See also LINK_SEARCH_START_STATIC.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LINK_SEARCH_START_STATIC">
<title>LINK_SEARCH_START_STATIC</title>
<abstract>
<para>Assume the linker looks for static libraries by default.</para>
</abstract>
<para>Some linkers support switches such as -Bstatic and -Bdynamic to determine whether to use static or shared libraries for -lXXX options.  CMake uses these options to set the link type for libraries whose full paths are not known or (in some cases) are in implicit link directories for the platform.  By default the linker search type is assumed to be -Bdynamic at the beginning of the library list.  This property switches the assumption to -Bstatic.  It is intended for use when linking an executable statically (e.g. with the GNU -static option).  See also LINK_SEARCH_END_STATIC.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LOCATION">
<title>LOCATION</title>
<abstract>
<para>Read-only location of a target on disk.</para>
</abstract>
<para>For an imported target, this read-only property returns the value of the LOCATION_&lt;CONFIG&gt; property for an unspecified configuration &lt;CONFIG&gt; provided by the target.
</para>
<para>For a non-imported target, this property is provided for compatibility with CMake 2.4 and below.  It was meant to get the location of an executable target's output file for use in add_custom_command.  The path may contain a build-system-specific portion that is replaced at build time with the configuration getting built (such as "$(ConfigurationName)" in VS). In CMake 2.6 and above add_custom_command automatically recognizes a target name in its COMMAND and DEPENDS options and computes the target location.  In CMake 2.8.4 and above add_custom_command recognizes generator expressions to refer to target locations anywhere in the command.  Therefore this property is not needed for creating custom commands.
</para>
<para>Do not set properties that affect the location of a target after reading this property.  These include properties whose names match "(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_&lt;CONFIG&gt;)?", "(IMPLIB_)?(PREFIX|SUFFIX)", or "LINKER_LANGUAGE".  Failure to follow this rule is not diagnosed and leaves the location of the target undefined.</para>
</sect2>
<sect2 id="cpack.prop_tgt.LOCATION__CONFIG_">
<title>LOCATION_&lt;CONFIG&gt;</title>
<abstract>
<para>Read-only property providing a target location on disk.</para>
</abstract>
<para>A read-only property that indicates where a target's main file is located on disk for the configuration &lt;CONFIG&gt;.  The property is defined only for library and executable targets.  An imported target may provide a set of configurations different from that of the importing project.  By default CMake looks for an exact-match but otherwise uses an arbitrary available configuration.  Use the MAP_IMPORTED_CONFIG_&lt;CONFIG&gt; property to map imported configurations explicitly.
</para>
<para>Do not set properties that affect the location of a target after reading this property.  These include properties whose names match "(RUNTIME|LIBRARY|ARCHIVE)_OUTPUT_(NAME|DIRECTORY)(_&lt;CONFIG&gt;)?", "(IMPLIB_)?(PREFIX|SUFFIX)", or "LINKER_LANGUAGE".  Failure to follow this rule is not diagnosed and leaves the location of the target undefined.</para>
</sect2>
<sect2 id="cpack.prop_tgt.MACOSX_BUNDLE">
<title>MACOSX_BUNDLE</title>
<abstract>
<para>Build an executable as an application bundle on Mac OS X.</para>
</abstract>
<para>When this property is set to true the executable when built on Mac OS X will be created as an application bundle.  This makes it a GUI executable that can be launched from the Finder.  See the MACOSX_BUNDLE_INFO_PLIST target property for information about creation of the Info.plist file for the application bundle.  This property is initialized by the value of the variable CMAKE_MACOSX_BUNDLE if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.MACOSX_BUNDLE_INFO_PLIST">
<title>MACOSX_BUNDLE_INFO_PLIST</title>
<abstract>
<para>Specify a custom Info.plist template for a Mac OS X App Bundle.</para>
</abstract>
<para>An executable target with MACOSX_BUNDLE enabled will be built as an application bundle on Mac OS X.  By default its Info.plist file is created by configuring a template called MacOSXBundleInfo.plist.in located in the CMAKE_MODULE_PATH.  This property specifies an alternative template file name which may be a full path.
</para>
<para>The following target properties may be set to specify content to be configured into the file:
</para>
<para>
<programlisting>  MACOSX_BUNDLE_INFO_STRING
  MACOSX_BUNDLE_ICON_FILE
  MACOSX_BUNDLE_GUI_IDENTIFIER
  MACOSX_BUNDLE_LONG_VERSION_STRING
  MACOSX_BUNDLE_BUNDLE_NAME
  MACOSX_BUNDLE_SHORT_VERSION_STRING
  MACOSX_BUNDLE_BUNDLE_VERSION
  MACOSX_BUNDLE_COPYRIGHT
</programlisting>
</para>
<para>CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set.  If a custom Info.plist is specified by this property it may of course hard-code all the settings instead of using the target properties.</para>
</sect2>
<sect2 id="cpack.prop_tgt.MACOSX_FRAMEWORK_INFO_PLIST">
<title>MACOSX_FRAMEWORK_INFO_PLIST</title>
<abstract>
<para>Specify a custom Info.plist template for a Mac OS X Framework.</para>
</abstract>
<para>A library target with FRAMEWORK enabled will be built as a framework on Mac OS X.  By default its Info.plist file is created by configuring a template called MacOSXFrameworkInfo.plist.in located in the CMAKE_MODULE_PATH.  This property specifies an alternative template file name which may be a full path.
</para>
<para>The following target properties may be set to specify content to be configured into the file:
</para>
<para>
<programlisting>  MACOSX_FRAMEWORK_ICON_FILE
  MACOSX_FRAMEWORK_IDENTIFIER
  MACOSX_FRAMEWORK_SHORT_VERSION_STRING
  MACOSX_FRAMEWORK_BUNDLE_VERSION
</programlisting>
</para>
<para>CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set.  If a custom Info.plist is specified by this property it may of course hard-code all the settings instead of using the target properties.</para>
</sect2>
<sect2 id="cpack.prop_tgt.MACOSX_RPATH">
<title>MACOSX_RPATH</title>
<abstract>
<para>Whether to use rpaths on Mac OS X.</para>
</abstract>
<para>When this property is set to true, the directory portion of the"install_name" field of shared libraries will default to "@rpath".Runtime paths will also be embedded in binaries using this target.This property is initialized by the value of the variable CMAKE_MACOSX_RPATH if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.MAP_IMPORTED_CONFIG__CONFIG_">
<title>MAP_IMPORTED_CONFIG_&lt;CONFIG&gt;</title>
<abstract>
<para>Map from project configuration to IMPORTED target's configuration.</para>
</abstract>
<para>Set this to the list of configurations of an imported target that may be used for the current project's &lt;CONFIG&gt; configuration.  Targets imported from another project may not provide the same set of configuration names available in the current project.  Setting this property tells CMake what imported configurations are suitable for use when building the &lt;CONFIG&gt; configuration.  The first configuration in the list found to be provided by the imported target is selected.  If this property is set and no matching configurations are available, then the imported target is considered to be not found.  This property is ignored for non-imported targets.</para>
</sect2>
<sect2 id="cpack.prop_tgt.NAME">
<title>NAME</title>
<abstract>
<para>Logical name for the target.</para>
</abstract>
<para>Read-only logical name for the target as used by CMake.</para>
</sect2>
<sect2 id="cpack.prop_tgt.NO_SONAME">
<title>NO_SONAME</title>
<abstract>
<para>Whether to set "soname" when linking a shared library or module.</para>
</abstract>
<para>Enable this boolean property if a generated shared library or module should not have "soname" set. Default is to set "soname" on all shared libraries and modules as long as the platform supports it. Generally, use this property only for leaf private libraries or plugins. If you use it on normal shared libraries which other targets link against, on some platforms a linker will insert a full path to the library (as specified at link time) into the dynamic section of the dependent binary. Therefore, once installed, dynamic loader may eventually fail to locate the library for the binary.</para>
</sect2>
<sect2 id="cpack.prop_tgt.OSX_ARCHITECTURES">
<title>OSX_ARCHITECTURES</title>
<abstract>
<para>Target specific architectures for OS X.</para>
</abstract>
<para>The OSX_ARCHITECTURES property sets the target binary architecture for targets on OS X.  This property is initialized by the value of the variable CMAKE_OSX_ARCHITECTURES if it is set when a target is created.  Use OSX_ARCHITECTURES_&lt;CONFIG&gt; to set the binary architectures on a per-configuration basis.  &lt;CONFIG&gt; is an upper-case name (ex: "OSX_ARCHITECTURES_DEBUG").</para>
</sect2>
<sect2 id="cpack.prop_tgt.OSX_ARCHITECTURES__CONFIG_">
<title>OSX_ARCHITECTURES_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration OS X binary architectures for a target.</para>
</abstract>
<para>This property is the configuration-specific version of OSX_ARCHITECTURES.</para>
</sect2>
<sect2 id="cpack.prop_tgt.OUTPUT_NAME">
<title>OUTPUT_NAME</title>
<abstract>
<para>Output name for target files.</para>
</abstract>
<para>This sets the base name for output files created for an executable or library target.  If not set, the logical target name is used by default.</para>
</sect2>
<sect2 id="cpack.prop_tgt.OUTPUT_NAME__CONFIG_">
<title>OUTPUT_NAME_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration target file base name.</para>
</abstract>
<para>This is the configuration-specific version of OUTPUT_NAME.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PDB_NAME">
<title>PDB_NAME</title>
<abstract>
<para>Output name for MS debug symbols .pdb file from linker.</para>
</abstract>
<para>Set the base name for debug symbols file created for an executable or shared library target.  If not set, the logical target name is used by default.  
</para>
<para>This property is not implemented by the Visual Studio 6 generator.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PDB_NAME__CONFIG_">
<title>PDB_NAME_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration name for MS debug symbols .pdb file.  </para>
</abstract>
<para>This is the configuration-specific version of PDB_NAME.  
</para>
<para>This property is not implemented by the Visual Studio 6 generator.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PDB_OUTPUT_DIRECTORY">
<title>PDB_OUTPUT_DIRECTORY</title>
<abstract>
<para>Output directory for MS debug symbols .pdb file from linker.</para>
</abstract>
<para>This property specifies the directory into which the MS debug symbols will be placed by the linker.  This property is initialized by the value of the variable CMAKE_PDB_OUTPUT_DIRECTORY if it is set when a target is created.
</para>
<para>This property is not implemented by the Visual Studio 6 generator.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PDB_OUTPUT_DIRECTORY__CONFIG_">
<title>PDB_OUTPUT_DIRECTORY_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output directory for MS debug symbols .pdb files.</para>
</abstract>
<para>This is a per-configuration version of PDB_OUTPUT_DIRECTORY, but multi-configuration generators (VS, Xcode) do NOT append a per-configuration subdirectory to the specified directory. This property is initialized by the value of the variable CMAKE_PDB_OUTPUT_DIRECTORY_&lt;CONFIG&gt; if it is set when a target is created.
</para>
<para>This property is not implemented by the Visual Studio 6 generator.</para>
</sect2>
<sect2 id="cpack.prop_tgt.POSITION_INDEPENDENT_CODE">
<title>POSITION_INDEPENDENT_CODE</title>
<abstract>
<para>Whether to create a position-independent target</para>
</abstract>
<para>The POSITION_INDEPENDENT_CODE property determines whether position independent executables or shared libraries will be created.  This property is true by default for SHARED and MODULE library targets and false otherwise.  This property is initialized by the value of the variable CMAKE_POSITION_INDEPENDENT_CODE if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.POST_INSTALL_SCRIPT">
<title>POST_INSTALL_SCRIPT</title>
<abstract>
<para>Deprecated install support.</para>
</abstract>
<para>The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the old way to specify CMake scripts to run before and after installing a target.  They are used only when the old INSTALL_TARGETS command is used to install the target.  Use the INSTALL command instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PREFIX">
<title>PREFIX</title>
<abstract>
<para>What comes before the library name.</para>
</abstract>
<para>A target property that can be set to override the prefix (such as "lib") on a library name.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PRE_INSTALL_SCRIPT">
<title>PRE_INSTALL_SCRIPT</title>
<abstract>
<para>Deprecated install support.</para>
</abstract>
<para>The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the old way to specify CMake scripts to run before and after installing a target.  They are used only when the old INSTALL_TARGETS command is used to install the target.  Use the INSTALL command instead.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PRIVATE_HEADER">
<title>PRIVATE_HEADER</title>
<abstract>
<para>Specify private header files in a FRAMEWORK shared library target.</para>
</abstract>
<para>Shared library targets marked with the FRAMEWORK property generate frameworks on OS X and normal shared libraries on other platforms.  This property may be set to a list of header files to be placed in the PrivateHeaders directory inside the framework folder.  On non-Apple platforms these headers may be installed using the PRIVATE_HEADER option to the install(TARGETS) command.</para>
</sect2>
<sect2 id="cpack.prop_tgt.PROJECT_LABEL">
<title>PROJECT_LABEL</title>
<abstract>
<para>Change the name of a target in an IDE.</para>
</abstract>
<para>Can be used to change the name of the target in an IDE like Visual Studio. </para>
</sect2>
<sect2 id="cpack.prop_tgt.PUBLIC_HEADER">
<title>PUBLIC_HEADER</title>
<abstract>
<para>Specify public header files in a FRAMEWORK shared library target.</para>
</abstract>
<para>Shared library targets marked with the FRAMEWORK property generate frameworks on OS X and normal shared libraries on other platforms.  This property may be set to a list of header files to be placed in the Headers directory inside the framework folder.  On non-Apple platforms these headers may be installed using the PUBLIC_HEADER option to the install(TARGETS) command.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RESOURCE">
<title>RESOURCE</title>
<abstract>
<para>Specify resource files in a FRAMEWORK shared library target.</para>
</abstract>
<para>Shared library targets marked with the FRAMEWORK property generate frameworks on OS X and normal shared libraries on other platforms.  This property may be set to a list of files to be placed in the Resources directory inside the framework folder.  On non-Apple platforms these files may be installed using the RESOURCE option to the install(TARGETS) command.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RULE_LAUNCH_COMPILE">
<title>RULE_LAUNCH_COMPILE</title>
<abstract>
<para>Specify a launcher for compile rules.</para>
</abstract>
<para>See the global property of the same name for details.  This overrides the global and directory property for a target.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RULE_LAUNCH_CUSTOM">
<title>RULE_LAUNCH_CUSTOM</title>
<abstract>
<para>Specify a launcher for custom rules.</para>
</abstract>
<para>See the global property of the same name for details.  This overrides the global and directory property for a target.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RULE_LAUNCH_LINK">
<title>RULE_LAUNCH_LINK</title>
<abstract>
<para>Specify a launcher for link rules.</para>
</abstract>
<para>See the global property of the same name for details.  This overrides the global and directory property for a target.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RUNTIME_OUTPUT_DIRECTORY">
<title>RUNTIME_OUTPUT_DIRECTORY</title>
<abstract>
<para>Output directory in which to build RUNTIME target files.</para>
</abstract>
<para>This property specifies the directory into which runtime target files should be built. Multi-configuration generators (VS, Xcode) append a per-configuration subdirectory to the specified directory.  There are three kinds of target files that may be built: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms.  This property is initialized by the value of the variable CMAKE_RUNTIME_OUTPUT_DIRECTORY if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RUNTIME_OUTPUT_DIRECTORY__CONFIG_">
<title>RUNTIME_OUTPUT_DIRECTORY_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output directory for RUNTIME target files.</para>
</abstract>
<para>This is a per-configuration version of RUNTIME_OUTPUT_DIRECTORY, but multi-configuration generators (VS, Xcode) do NOT append a per-configuration subdirectory to the specified directory.  This property is initialized by the value of the variable CMAKE_RUNTIME_OUTPUT_DIRECTORY_&lt;CONFIG&gt; if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RUNTIME_OUTPUT_NAME">
<title>RUNTIME_OUTPUT_NAME</title>
<abstract>
<para>Output name for RUNTIME target files.</para>
</abstract>
<para>This property specifies the base name for runtime target files.  It overrides OUTPUT_NAME and OUTPUT_NAME_&lt;CONFIG&gt; properties.  There are three kinds of target files that may be built: archive, library, and runtime.  Executables are always treated as runtime targets. Static libraries are always treated as archive targets. Module libraries are always treated as library targets. For non-DLL platforms shared libraries are treated as library targets. For DLL platforms the DLL part of a shared library is treated as a runtime target and the corresponding import library is treated as an archive target. All Windows-based systems including Cygwin are DLL platforms.</para>
</sect2>
<sect2 id="cpack.prop_tgt.RUNTIME_OUTPUT_NAME__CONFIG_">
<title>RUNTIME_OUTPUT_NAME_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration output name for RUNTIME target files.</para>
</abstract>
<para>This is the configuration-specific version of RUNTIME_OUTPUT_NAME.</para>
</sect2>
<sect2 id="cpack.prop_tgt.SKIP_BUILD_RPATH">
<title>SKIP_BUILD_RPATH</title>
<abstract>
<para>Should rpaths be used for the build tree.</para>
</abstract>
<para>SKIP_BUILD_RPATH is a boolean specifying whether to skip automatic generation of an rpath allowing the target to run from the build tree.  This property is initialized by the value of the variable CMAKE_SKIP_BUILD_RPATH if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.SOURCES">
<title>SOURCES</title>
<abstract>
<para>Source names specified for a target.</para>
</abstract>
<para>Read-only list of sources specified for a target.  The names returned are suitable for passing to the set_source_files_properties command.</para>
</sect2>
<sect2 id="cpack.prop_tgt.SOVERSION">
<title>SOVERSION</title>
<abstract>
<para>What version number is this target.</para>
</abstract>
<para>For shared libraries VERSION and SOVERSION can be used to specify the build version and API version respectively. When building or installing appropriate symlinks are created if the platform supports symlinks and the linker supports so-names. If only one of both is specified the missing is assumed to have the same version number. SOVERSION is ignored if NO_SONAME property is set. For shared libraries and executables on Windows the VERSION attribute is parsed to extract a "major.minor" version number. These numbers are used as the image version of the binary. </para>
</sect2>
<sect2 id="cpack.prop_tgt.STATIC_LIBRARY_FLAGS">
<title>STATIC_LIBRARY_FLAGS</title>
<abstract>
<para>Extra flags to use when linking static libraries.</para>
</abstract>
<para>Extra flags to use when linking a static library.</para>
</sect2>
<sect2 id="cpack.prop_tgt.STATIC_LIBRARY_FLAGS__CONFIG_">
<title>STATIC_LIBRARY_FLAGS_&lt;CONFIG&gt;</title>
<abstract>
<para>Per-configuration flags for creating a static library.</para>
</abstract>
<para>This is the configuration-specific version of STATIC_LIBRARY_FLAGS.</para>
</sect2>
<sect2 id="cpack.prop_tgt.SUFFIX">
<title>SUFFIX</title>
<abstract>
<para>What comes after the target name.</para>
</abstract>
<para>A target property that can be set to override the suffix (such as ".so" or ".exe") on the name of a library, module or executable.</para>
</sect2>
<sect2 id="cpack.prop_tgt.TYPE">
<title>TYPE</title>
<abstract>
<para>The type of the target.</para>
</abstract>
<para>This read-only property can be used to test the type of the given target. It will be one of STATIC_LIBRARY, MODULE_LIBRARY, SHARED_LIBRARY, EXECUTABLE or one of the internal target types.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VERSION">
<title>VERSION</title>
<abstract>
<para>What version number is this target.</para>
</abstract>
<para>For shared libraries VERSION and SOVERSION can be used to specify the build version and API version respectively. When building or installing appropriate symlinks are created if the platform supports symlinks and the linker supports so-names. If only one of both is specified the missing is assumed to have the same version number. For executables VERSION can be used to specify the build version. When building or installing appropriate symlinks are created if the platform supports symlinks. For shared libraries and executables on Windows the VERSION attribute is parsed to extract a "major.minor" version number. These numbers are used as the image version of the binary. </para>
</sect2>
<sect2 id="cpack.prop_tgt.VISIBILITY_INLINES_HIDDEN">
<title>VISIBILITY_INLINES_HIDDEN</title>
<abstract>
<para>Whether to add a compile flag to hide symbols of inline functions</para>
</abstract>
<para>The VISIBILITY_INLINES_HIDDEN property determines whether a flag for hiding symbols for inline functions. the value passed used in a visibility related compile option, such as -fvisibility=.  This property only has an affect for libraries and executables with exports.  This property is initialized by the value of the variable CMAKE_VISIBILITY_INLINES_HIDDEN if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_DOTNET_REFERENCES">
<title>VS_DOTNET_REFERENCES</title>
<abstract>
<para>Visual Studio managed project .NET references</para>
</abstract>
<para>Adds one or more semicolon-delimited .NET references to a generated Visual Studio project. For example, "System;System.Windows.Forms".</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_DOTNET_TARGET_FRAMEWORK_VERSION">
<title>VS_DOTNET_TARGET_FRAMEWORK_VERSION</title>
<abstract>
<para>Specify the .NET target framework version.</para>
</abstract>
<para>Used to specify the .NET target framework version for C++/CLI. For example, "v4.5".</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_GLOBAL__variable_">
<title>VS_GLOBAL_&lt;variable&gt;</title>
<abstract>
<para>Visual Studio project-specific global variable.</para>
</abstract>
<para>Tell the Visual Studio generator to set the global variable '&lt;variable&gt;' to a given value in the generated Visual Studio project. Ignored on other generators. Qt integration works better if VS_GLOBAL_QtVersion is set to the version FindQt4.cmake found. For example, "4.7.3"</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_GLOBAL_KEYWORD">
<title>VS_GLOBAL_KEYWORD</title>
<abstract>
<para>Visual Studio project keyword.</para>
</abstract>
<para>Sets the "keyword" attribute for a generated Visual Studio project. Defaults to "Win32Proj". You may wish to override this value with "ManagedCProj", for example, in a Visual Studio managed C++ unit test project.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_GLOBAL_PROJECT_TYPES">
<title>VS_GLOBAL_PROJECT_TYPES</title>
<abstract>
<para>Visual Studio project type(s).</para>
</abstract>
<para>Can be set to one or more UUIDs recognized by Visual Studio to indicate the type of project. This value is copied verbatim into the generated project file. Example for a managed C++ unit testing project:
</para>
<para>
<programlisting> {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
</programlisting>
</para>
<para>UUIDs are semicolon-delimited.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_GLOBAL_ROOTNAMESPACE">
<title>VS_GLOBAL_ROOTNAMESPACE</title>
<abstract>
<para>Visual Studio project root namespace.</para>
</abstract>
<para>Sets the "RootNamespace" attribute for a generated Visual Studio project.  The attribute will be generated only if this is set.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_KEYWORD">
<title>VS_KEYWORD</title>
<abstract>
<para>Visual Studio project keyword.</para>
</abstract>
<para>Can be set to change the visual studio keyword, for example Qt integration works better if this is set to Qt4VSv1.0. </para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_SCC_AUXPATH">
<title>VS_SCC_AUXPATH</title>
<abstract>
<para>Visual Studio Source Code Control Aux Path.</para>
</abstract>
<para>Can be set to change the visual studio source code control auxpath property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_SCC_LOCALPATH">
<title>VS_SCC_LOCALPATH</title>
<abstract>
<para>Visual Studio Source Code Control Local Path.</para>
</abstract>
<para>Can be set to change the visual studio source code control local path property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_SCC_PROJECTNAME">
<title>VS_SCC_PROJECTNAME</title>
<abstract>
<para>Visual Studio Source Code Control Project.</para>
</abstract>
<para>Can be set to change the visual studio source code control project name property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_SCC_PROVIDER">
<title>VS_SCC_PROVIDER</title>
<abstract>
<para>Visual Studio Source Code Control Provider.</para>
</abstract>
<para>Can be set to change the visual studio source code control provider property.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_WINRT_EXTENSIONS">
<title>VS_WINRT_EXTENSIONS</title>
<abstract>
<para>Visual Studio project C++/CX language extensions for Windows Runtime</para>
</abstract>
<para>Can be set to enable C++/CX language extensions.</para>
</sect2>
<sect2 id="cpack.prop_tgt.VS_WINRT_REFERENCES">
<title>VS_WINRT_REFERENCES</title>
<abstract>
<para>Visual Studio project Windows Runtime Metadata references</para>
</abstract>
<para>Adds one or more semicolon-delimited WinRT references to a generated Visual Studio project. For example, "Windows;Windows.UI.Core".</para>
</sect2>
<sect2 id="cpack.prop_tgt.WIN32_EXECUTABLE">
<title>WIN32_EXECUTABLE</title>
<abstract>
<para>Build an executable with a WinMain entry point on windows.</para>
</abstract>
<para>When this property is set to true the executable when linked on Windows will be created with a WinMain() entry point instead of just main().  This makes it a GUI executable instead of a console application.  See the CMAKE_MFC_FLAG variable documentation to configure use of MFC for WinMain executables.  This property is initialized by the value of the variable CMAKE_WIN32_EXECUTABLE if it is set when a target is created.</para>
</sect2>
<sect2 id="cpack.prop_tgt.XCODE_ATTRIBUTE__an_attribute_">
<title>XCODE_ATTRIBUTE_&lt;an-attribute&gt;</title>
<abstract>
<para>Set Xcode target attributes directly.</para>
</abstract>
<para>Tell the Xcode generator to set '&lt;an-attribute&gt;' to a given value in the generated Xcode project.  Ignored on other generators.</para>
</sect2>
</sect1>
<sect1 id="cpack.Properties_on_Tests">
<title>Properties on Tests</title>
<sect2 id="cpack.prop_test.ATTACHED_FILES">
<title>ATTACHED_FILES</title>
<abstract>
<para>Attach a list of files to a dashboard submission.</para>
</abstract>
<para>Set this property to a list of files that will be encoded and submitted to the dashboard as an addition to the test result.</para>
</sect2>
<sect2 id="cpack.prop_test.ATTACHED_FILES_ON_FAIL">
<title>ATTACHED_FILES_ON_FAIL</title>
<abstract>
<para>Attach a list of files to a dashboard submission if the test fails.</para>
</abstract>
<para>Same as ATTACHED_FILES, but these files will only be included if the test does not pass.</para>
</sect2>
<sect2 id="cpack.prop_test.COST">
<title>COST</title>
<abstract>
<para>Set this to a floating point value. Tests in a test set will be run in descending order of cost.</para>
</abstract>
<para>This property describes the cost of a test. You can explicitly set this value; tests with higher COST values will run first.</para>
</sect2>
<sect2 id="cpack.prop_test.DEPENDS">
<title>DEPENDS</title>
<abstract>
<para>Specifies that this test should only be run after the specified list of tests.</para>
</abstract>
<para>Set this to a list of tests that must finish before this test is run.</para>
</sect2>
<sect2 id="cpack.prop_test.ENVIRONMENT">
<title>ENVIRONMENT</title>
<abstract>
<para>Specify environment variables that should be defined for running a test.</para>
</abstract>
<para>If set to a list of environment variables and values of the form MYVAR=value those environment variables will be defined while running the test. The environment is restored to its previous state after the test is done.</para>
</sect2>
<sect2 id="cpack.prop_test.FAIL_REGULAR_EXPRESSION">
<title>FAIL_REGULAR_EXPRESSION</title>
<abstract>
<para>If the output matches this regular expression the test will fail.</para>
</abstract>
<para>If set, if the output matches one of specified regular expressions, the test will fail.For example: FAIL_REGULAR_EXPRESSION "[^a-z]Error;ERROR;Failed"</para>
</sect2>
<sect2 id="cpack.prop_test.LABELS">
<title>LABELS</title>
<abstract>
<para>Specify a list of text labels associated with a test.</para>
</abstract>
<para>The list is reported in dashboard submissions.</para>
</sect2>
<sect2 id="cpack.prop_test.MEASUREMENT">
<title>MEASUREMENT</title>
<abstract>
<para>Specify a CDASH measurement and value to be reported for a test.</para>
</abstract>
<para>If set to a name then that name will be reported to CDASH as a named measurement with a value of 1. You may also specify a value by setting MEASUREMENT to "measurement=value".</para>
</sect2>
<sect2 id="cpack.prop_test.PASS_REGULAR_EXPRESSION">
<title>PASS_REGULAR_EXPRESSION</title>
<abstract>
<para>The output must match this regular expression for the test to pass.</para>
</abstract>
<para>If set, the test output will be checked against the specified regular expressions and at least one of the regular expressions has to match, otherwise the test will fail.</para>
</sect2>
<sect2 id="cpack.prop_test.PROCESSORS">
<title>PROCESSORS</title>
<abstract>
<para>How many process slots this test requires</para>
</abstract>
<para>Denotes the number of processors that this test will require. This is typically used for MPI tests, and should be used in conjunction with the ctest_test PARALLEL_LEVEL option.</para>
</sect2>
<sect2 id="cpack.prop_test.REQUIRED_FILES">
<title>REQUIRED_FILES</title>
<abstract>
<para>List of files required to run the test.</para>
</abstract>
<para>If set to a list of files, the test will not be run unless all of the files exist.</para>
</sect2>
<sect2 id="cpack.prop_test.RESOURCE_LOCK">
<title>RESOURCE_LOCK</title>
<abstract>
<para>Specify a list of resources that are locked by this test.</para>
</abstract>
<para>If multiple tests specify the same resource lock, they are guaranteed not to run concurrently.</para>
</sect2>
<sect2 id="cpack.prop_test.RUN_SERIAL">
<title>RUN_SERIAL</title>
<abstract>
<para>Do not run this test in parallel with any other test.</para>
</abstract>
<para>Use this option in conjunction with the ctest_test PARALLEL_LEVEL option to specify that this test should not be run in parallel with any other tests.</para>
</sect2>
<sect2 id="cpack.prop_test.TIMEOUT">
<title>TIMEOUT</title>
<abstract>
<para>How many seconds to allow for this test.</para>
</abstract>
<para>This property if set will limit a test to not take more than the specified number of seconds to run. If it exceeds that the test process will be killed and ctest will move to the next test. This setting takes precedence over CTEST_TESTING_TIMEOUT.</para>
</sect2>
<sect2 id="cpack.prop_test.WILL_FAIL">
<title>WILL_FAIL</title>
<abstract>
<para>If set to true, this will invert the pass/fail flag of the test.</para>
</abstract>
<para>This property can be used for tests that are expected to fail and return a non zero return code.</para>
</sect2>
<sect2 id="cpack.prop_test.WORKING_DIRECTORY">
<title>WORKING_DIRECTORY</title>
<abstract>
<para>The directory from which the test executable will be called.</para>
</abstract>
<para>If this is not set it is called from the directory the test executable is located in.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables">
<title>Variables</title>
<sect2 id="cpack.variable.CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION">
<title>CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION</title>
<abstract>
<para>Ask CPack to error out as soon as a file with absolute INSTALL DESTINATION is encountered.</para>
</abstract>
<para>The fatal error is emitted before the installation of the offending file takes place. Some CPack generators, like NSIS,enforce this internally. This variable triggers the definition ofCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runsVariables common to all CPack generators</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_That_Change_Behavior">
<title>Variables That Change Behavior</title>
<sect2 id="cpack.variable.BUILD_SHARED_LIBS">
<title>BUILD_SHARED_LIBS</title>
<abstract>
<para>Global flag to cause add_library to create shared libraries if on.</para>
</abstract>
<para>If present and true, this will cause all libraries to be built shared unless the library was explicitly added as a static library.  This variable is often added to projects as an OPTION so that each user of a project can decide if they want to build the project using shared or static libraries.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ABSOLUTE_DESTINATION_FILES">
<title>CMAKE_ABSOLUTE_DESTINATION_FILES</title>
<abstract>
<para>List of files which have been installed using  an ABSOLUTE DESTINATION path.</para>
</abstract>
<para>This variable is defined by CMake-generated cmake_install.cmake scripts. It can be used (read-only) by programs or scripts that source those install scripts. This is used by some CPack generators (e.g. RPM).</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_AUTOMOC_RELAXED_MODE">
<title>CMAKE_AUTOMOC_RELAXED_MODE</title>
<abstract>
<para>Switch between strict and relaxed automoc mode.</para>
</abstract>
<para>By default, automoc behaves exactly as described in the documentation of the AUTOMOC target property.  When set to TRUE, it accepts more input and tries to find the correct input file for moc even if it differs from the documented behaviour.  In this mode it e.g. also checks whether a header file is intended to be processed by moc when a "foo.moc" file has been included.
</para>
<para>Relaxed mode has to be enabled for KDE4 compatibility.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_BACKWARDS_COMPATIBILITY">
<title>CMAKE_BACKWARDS_COMPATIBILITY</title>
<abstract>
<para>Version of cmake required to build project</para>
</abstract>
<para>From the point of view of backwards compatibility, this specifies what version of CMake should be supported. By default this value is the version number of CMake that you are running. You can set this to an older version of CMake to support deprecated commands of CMake in projects that were written to use older versions of CMake. This can be set by the user or set at the beginning of a CMakeLists file.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_BUILD_TYPE">
<title>CMAKE_BUILD_TYPE</title>
<abstract>
<para>Specifies the build type on single-configuration generators.</para>
</abstract>
<para>This statically specifies what build type (configuration) will be built in this build tree. Possible values are empty, Debug, Release, RelWithDebInfo and MinSizeRel.  This variable is only meaningful to single-configuration generators (such as make and Ninja) i.e. those which choose a single configuration when CMake runs to generate a build tree as opposed to multi-configuration generators which offer selection of the build configuration within the generated build environment.  There are many per-config properties and variables (usually following clean SOME_VAR_&lt;CONFIG&gt; order conventions), such as CMAKE_C_FLAGS_&lt;CONFIG&gt;, specified as uppercase: CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL].  For example, in a build tree configured to build type Debug, CMake will see to having CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS settings.  See also CMAKE_CONFIGURATION_TYPES.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_COLOR_MAKEFILE">
<title>CMAKE_COLOR_MAKEFILE</title>
<abstract>
<para>Enables color output when using the Makefile generator.</para>
</abstract>
<para>When enabled, the generated Makefiles will produce colored output.  Default is ON.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CONFIGURATION_TYPES">
<title>CMAKE_CONFIGURATION_TYPES</title>
<abstract>
<para>Specifies the available build types on multi-config generators.</para>
</abstract>
<para>This specifies what build types (configurations) will be available such as Debug, Release, RelWithDebInfo etc.  This has reasonable defaults on most platforms, but can be extended to provide other build types.  See also CMAKE_BUILD_TYPE for details of managing configuration data, and CMAKE_CFG_INTDIR.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_DEBUG_TARGET_PROPERTIES">
<title>CMAKE_DEBUG_TARGET_PROPERTIES</title>
<abstract>
<para>Enables tracing output for target properties.</para>
</abstract>
<para>This variable can be populated with a list of properties to generate debug output for when evaluating target properties.  Currently it can only be used when evaluating the INCLUDE_DIRECTORIES, COMPILE_DEFINITIONS and COMPILE_OPTIONS target properties.  In that case, it outputs a backtrace for each entry in the target property.  Default is unset.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_DISABLE_FIND_PACKAGE__PackageName_">
<title>CMAKE_DISABLE_FIND_PACKAGE_&lt;PackageName&gt;</title>
<abstract>
<para>Variable for disabling find_package() calls.</para>
</abstract>
<para>Every non-REQUIRED find_package() call in a project can be disabled by setting the variable CMAKE_DISABLE_FIND_PACKAGE_&lt;PackageName&gt; to TRUE. This can be used to build a project without an optional package, although that package is installed.
</para>
<para>This switch should be used during the initial CMake run. Otherwise if the package has already been found in a previous CMake run, the variables which have been stored in the cache will still be there.  In that case it is recommended to remove the cache variables for this package from the cache using the cache editor or cmake -U</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ERROR_DEPRECATED">
<title>CMAKE_ERROR_DEPRECATED</title>
<abstract>
<para>Whether to issue deprecation errors for macros and functions.</para>
</abstract>
<para>If TRUE, this can be used by macros and functions to issue fatal errors when deprecated macros or functions are used.  This variable is FALSE by default.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION">
<title>CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION</title>
<abstract>
<para>Ask cmake_install.cmake script to error out as soon as a file with absolute INSTALL DESTINATION is encountered.</para>
</abstract>
<para>The fatal error is emitted before the installation of the offending file takes place. This variable is used by CMake-generated cmake_install.cmake scripts. If one sets this variable to ON while running the script, it may get fatal error messages from the script.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_FIND_LIBRARY_PREFIXES">
<title>CMAKE_FIND_LIBRARY_PREFIXES</title>
<abstract>
<para>Prefixes to prepend when looking for libraries.</para>
</abstract>
<para>This specifies what prefixes to add to library names when the find_library command looks for libraries. On UNIX systems this is typically lib, meaning that when trying to find the foo library it will look for libfoo.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_FIND_LIBRARY_SUFFIXES">
<title>CMAKE_FIND_LIBRARY_SUFFIXES</title>
<abstract>
<para>Suffixes to append when looking for libraries.</para>
</abstract>
<para>This specifies what suffixes to add to library names when the find_library command looks for libraries. On Windows systems this is typically .lib and .dll, meaning that when trying to find the foo library it will look for foo.dll etc.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_FIND_PACKAGE_WARN_NO_MODULE">
<title>CMAKE_FIND_PACKAGE_WARN_NO_MODULE</title>
<abstract>
<para>Tell find_package to warn if called without an explicit mode.</para>
</abstract>
<para>If find_package is called without an explicit mode option (MODULE, CONFIG or NO_MODULE) and no Find&lt;pkg&gt;.cmake module is in CMAKE_MODULE_PATH then CMake implicitly assumes that the caller intends to search for a package configuration file.  If no package configuration file is found then the wording of the failure message must account for both the case that the package is really missing and the case that the project has a bug and failed to provide the intended Find module.  If instead the caller specifies an explicit mode option then the failure message can be more specific.
</para>
<para>Set CMAKE_FIND_PACKAGE_WARN_NO_MODULE to TRUE to tell find_package to warn when it implicitly assumes Config mode.  This helps developers enforce use of an explicit mode in all calls to find_package within a project.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_IGNORE_PATH">
<title>CMAKE_IGNORE_PATH</title>
<abstract>
<para>Path to be ignored by FIND_XXX() commands.</para>
</abstract>
<para>Specifies directories to be ignored by searches in FIND_XXX() commands.  This is useful in cross-compiled environments where some system directories contain incompatible but possibly linkable libraries. For example, on cross-compiled cluster environments, this allows a user to ignore directories containing libraries meant for the front-end machine that modules like FindX11 (and others) would normally search.  By default this is empty; it is intended to be set by the project.  Note that CMAKE_IGNORE_PATH takes a list of directory names, NOT a list of prefixes. If you want to ignore paths under prefixes (bin, include, lib, etc.), you'll need to specify them explicitly.  See also CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH, CMAKE_PROGRAM_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INCLUDE_PATH">
<title>CMAKE_INCLUDE_PATH</title>
<abstract>
<para>Path used for searching by FIND_FILE() and FIND_PATH().</para>
</abstract>
<para>Specifies a path which will be used both by FIND_FILE() and FIND_PATH(). Both commands will check each of the contained directories for the existence of the file which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_PREFIX_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INSTALL_DEFAULT_COMPONENT_NAME">
<title>CMAKE_INSTALL_DEFAULT_COMPONENT_NAME</title>
<abstract>
<para>Default component used in install() commands.</para>
</abstract>
<para>If an install() command is used without the COMPONENT argument, these files will be grouped into a default component. The name of this default install component will be taken from this variable.  It defaults to "Unspecified".</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INSTALL_PREFIX">
<title>CMAKE_INSTALL_PREFIX</title>
<abstract>
<para>Install directory used by install.</para>
</abstract>
<para>If "make install" is invoked or INSTALL is built, this directory is prepended onto all install directories. This variable defaults to /usr/local on UNIX and c:/Program Files on Windows.
</para>
<para>On UNIX one can use the DESTDIR mechanism in order to relocate the whole installation.  DESTDIR means DESTination DIRectory. It is commonly used by makefile users in order to install software at non-default location.  It is usually invoked like this:
</para>
<para>
<programlisting> make DESTDIR=/home/john install
</programlisting>
</para>
<para>which will install the concerned software using the installation prefix, e.g. "/usr/local" prepended with the DESTDIR value which finally gives "/home/john/usr/local".
</para>
<para>WARNING: DESTDIR may not be used on Windows because installation prefix usually contains a drive letter like in "C:/Program Files" which cannot be prepended with some other prefix.
</para>
<para>The installation prefix is also added to CMAKE_SYSTEM_PREFIX_PATH so that find_package, find_program, find_library, find_path, and find_file will search the prefix for other software.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LIBRARY_PATH">
<title>CMAKE_LIBRARY_PATH</title>
<abstract>
<para>Path used for searching by FIND_LIBRARY().</para>
</abstract>
<para>Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() will check each of the contained directories for the existence of the library which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_PREFIX_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MFC_FLAG">
<title>CMAKE_MFC_FLAG</title>
<abstract>
<para>Tell cmake to use MFC for an executable or dll.</para>
</abstract>
<para>This can be set in a CMakeLists.txt file and will enable MFC in the application.  It should be set to 1 for the static MFC library, and 2 for the shared MFC library.  This is used in Visual Studio 6 and 7 project files.   The CMakeSetup dialog used MFC and the CMakeLists.txt looks like this:
</para>
<para>
<programlisting>  add_definitions(-D_AFXDLL)
  set(CMAKE_MFC_FLAG 2)
  add_executable(CMakeSetup WIN32 ${SRCS})
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MODULE_PATH">
<title>CMAKE_MODULE_PATH</title>
<abstract>
<para>List of directories to search for CMake modules.</para>
</abstract>
<para>Commands like include() and find_package() search for files in directories listed by this variable before checking the default modules that come with CMake.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_NOT_USING_CONFIG_FLAGS">
<title>CMAKE_NOT_USING_CONFIG_FLAGS</title>
<abstract>
<para>Skip _BUILD_TYPE flags if true.</para>
</abstract>
<para>This is an internal flag used by the generators in CMake to tell CMake to skip the _BUILD_TYPE flags.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_POLICY_DEFAULT_CMP_NNNN_">
<title>CMAKE_POLICY_DEFAULT_CMP&lt;NNNN&gt;</title>
<abstract>
<para>Default for CMake Policy CMP&lt;NNNN&gt; when it is otherwise left unset.</para>
</abstract>
<para>Commands cmake_minimum_required(VERSION) and cmake_policy(VERSION) by default leave policies introduced after the given version unset.  Set CMAKE_POLICY_DEFAULT_CMP&lt;NNNN&gt; to OLD or NEW to specify the default for policy CMP&lt;NNNN&gt;, where &lt;NNNN&gt; is the policy number.
</para>
<para>This variable should not be set by a project in CMake code; use cmake_policy(SET) instead.  Users running CMake may set this variable in the cache (e.g. -DCMAKE_POLICY_DEFAULT_CMP&lt;NNNN&gt;=&lt;OLD|NEW&gt;) to set a policy not otherwise set by the project.  Set to OLD to quiet a policy warning while using old behavior or to NEW to try building the project with new behavior.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_PREFIX_PATH">
<title>CMAKE_PREFIX_PATH</title>
<abstract>
<para>Path used for searching by FIND_XXX(), with appropriate suffixes added.</para>
</abstract>
<para>Specifies a path which will be used by the FIND_XXX() commands. It contains the "base" directories, the FIND_XXX() commands append appropriate subdirectories to the base directories. So FIND_PROGRAM() adds /bin to each of the directories in the path, FIND_LIBRARY() appends /lib to each of the directories, and FIND_PATH() and FIND_FILE() append /include . By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_INCLUDE_PATH, CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_PROGRAM_PATH">
<title>CMAKE_PROGRAM_PATH</title>
<abstract>
<para>Path used for searching by FIND_PROGRAM().</para>
</abstract>
<para>Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() will check each of the contained directories for the existence of the program which is currently searched. By default it is empty, it is intended to be set by the project. See also CMAKE_SYSTEM_PROGRAM_PATH,  CMAKE_PREFIX_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SKIP_INSTALL_ALL_DEPENDENCY">
<title>CMAKE_SKIP_INSTALL_ALL_DEPENDENCY</title>
<abstract>
<para>Don't make the install target depend on the all target.</para>
</abstract>
<para>By default, the "install" target depends on the "all" target.  This has the effect, that when "make install" is invoked or INSTALL is built, first the "all" target is built, then the installation starts.  If CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set to TRUE, this dependency is not created, so the installation process will start immediately, independent from whether the project has been completely built or not.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_IGNORE_PATH">
<title>CMAKE_SYSTEM_IGNORE_PATH</title>
<abstract>
<para>Path to be ignored by FIND_XXX() commands.</para>
</abstract>
<para>Specifies directories to be ignored by searches in FIND_XXX() commands.  This is useful in cross-compiled environments where some system directories contain incompatible but possibly linkable libraries. For example, on cross-compiled cluster environments, this allows a user to ignore directories containing libraries meant for the front-end machine that modules like FindX11 (and others) would normally search.  By default this contains a list of directories containing incompatible binaries for the host system.  See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_SYSTEM_INCLUDE_PATH, and CMAKE_SYSTEM_PROGRAM_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_INCLUDE_PATH">
<title>CMAKE_SYSTEM_INCLUDE_PATH</title>
<abstract>
<para>Path used for searching by FIND_FILE() and FIND_PATH().</para>
</abstract>
<para>Specifies a path which will be used both by FIND_FILE() and FIND_PATH(). Both commands will check each of the contained directories for the existence of the file which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_INCLUDE_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_LIBRARY_PATH">
<title>CMAKE_SYSTEM_LIBRARY_PATH</title>
<abstract>
<para>Path used for searching by FIND_LIBRARY().</para>
</abstract>
<para>Specifies a path which will be used by FIND_LIBRARY(). FIND_LIBRARY() will check each of the contained directories for the existence of the library which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_LIBRARY_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_PREFIX_PATH">
<title>CMAKE_SYSTEM_PREFIX_PATH</title>
<abstract>
<para>Path used for searching by FIND_XXX(), with appropriate suffixes added.</para>
</abstract>
<para>Specifies a path which will be used by the FIND_XXX() commands. It contains the "base" directories, the FIND_XXX() commands append appropriate subdirectories to the base directories. So FIND_PROGRAM() adds /bin to each of the directories in the path, FIND_LIBRARY() appends /lib to each of the directories, and FIND_PATH() and FIND_FILE() append /include . By default this contains the standard directories for the current system and the CMAKE_INSTALL_PREFIX.  It is NOT intended to be modified by the project, use CMAKE_PREFIX_PATH for this. See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_SYSTEM_LIBRARY_PATH, CMAKE_SYSTEM_PROGRAM_PATH, and CMAKE_SYSTEM_IGNORE_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_PROGRAM_PATH">
<title>CMAKE_SYSTEM_PROGRAM_PATH</title>
<abstract>
<para>Path used for searching by FIND_PROGRAM().</para>
</abstract>
<para>Specifies a path which will be used by FIND_PROGRAM(). FIND_PROGRAM() will check each of the contained directories for the existence of the program which is currently searched. By default it contains the standard directories for the current system. It is NOT intended to be modified by the project, use CMAKE_PROGRAM_PATH for this. See also CMAKE_SYSTEM_PREFIX_PATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_USER_MAKE_RULES_OVERRIDE">
<title>CMAKE_USER_MAKE_RULES_OVERRIDE</title>
<abstract>
<para>Specify a CMake file that overrides platform information.</para>
</abstract>
<para>CMake loads the specified file while enabling support for each language from either the project() or enable_language() commands.  It is loaded after CMake's builtin compiler and platform information modules have been loaded but before the information is used.  The file may set platform information variables to override CMake's defaults.
</para>
<para>This feature is intended for use only in overriding information variables that must be set before CMake builds its first test project to check that the compiler for a language works.  It should not be used to load a file in cases that a normal include() will work.  Use it only as a last resort for behavior that cannot be achieved any other way.  For example, one may set CMAKE_C_FLAGS_INIT to change the default value used to initialize CMAKE_C_FLAGS before it is cached.  The override file should NOT be used to set anything that could be set after languages are enabled, such as variables like CMAKE_RUNTIME_OUTPUT_DIRECTORY that affect the placement of binaries.  Information set in the file will be used for try_compile and try_run builds too.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_WARN_DEPRECATED">
<title>CMAKE_WARN_DEPRECATED</title>
<abstract>
<para>Whether to issue deprecation warnings for macros and functions.</para>
</abstract>
<para>If TRUE, this can be used by macros and functions to issue deprecation warnings.  This variable is FALSE by default.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION">
<title>CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION</title>
<abstract>
<para>Ask cmake_install.cmake script to warn each time a file with absolute INSTALL DESTINATION is encountered.</para>
</abstract>
<para>This variable is used by CMake-generated cmake_install.cmake scripts. If one sets this variable to ON while running the script, it may get warning messages from the script.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_That_Describe_the_System">
<title>Variables That Describe the System</title>
<sect2 id="cpack.variable.APPLE">
<title>APPLE</title>
<abstract>
<para>True if running on Mac OS X.</para>
</abstract>
<para>Set to true on Mac OS X.</para>
</sect2>
<sect2 id="cpack.variable.BORLAND">
<title>BORLAND</title>
<abstract>
<para>True if the Borland compiler is being used.</para>
</abstract>
<para>This is set to true if the Borland compiler is being used.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CL_64">
<title>CMAKE_CL_64</title>
<abstract>
<para>Using the 64 bit compiler from Microsoft</para>
</abstract>
<para>Set to true when using the 64 bit cl compiler from Microsoft.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_COMPILER_2005">
<title>CMAKE_COMPILER_2005</title>
<abstract>
<para>Using the Visual Studio 2005 compiler from Microsoft</para>
</abstract>
<para>Set to true when using the Visual Studio 2005 compiler from Microsoft.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_APPLE">
<title>CMAKE_HOST_APPLE</title>
<abstract>
<para>True for Apple OS X operating systems.</para>
</abstract>
<para>Set to true when the host system is Apple OS X.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_SYSTEM">
<title>CMAKE_HOST_SYSTEM</title>
<abstract>
<para>Name of system cmake is being run on.</para>
</abstract>
<para>The same as CMAKE_SYSTEM but for the host system instead of the target system when cross compiling.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_SYSTEM_NAME">
<title>CMAKE_HOST_SYSTEM_NAME</title>
<abstract>
<para>Name of the OS CMake is running on.</para>
</abstract>
<para>The same as CMAKE_SYSTEM_NAME but for the host system instead of the target system when cross compiling.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_SYSTEM_PROCESSOR">
<title>CMAKE_HOST_SYSTEM_PROCESSOR</title>
<abstract>
<para>The name of the CPU CMake is running on.</para>
</abstract>
<para>The same as CMAKE_SYSTEM_PROCESSOR but for the host system instead of the target system when cross compiling.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_SYSTEM_VERSION">
<title>CMAKE_HOST_SYSTEM_VERSION</title>
<abstract>
<para>OS version CMake is running on.</para>
</abstract>
<para>The same as CMAKE_SYSTEM_VERSION but for the host system instead of the target system when cross compiling.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_UNIX">
<title>CMAKE_HOST_UNIX</title>
<abstract>
<para>True for UNIX and UNIX like operating systems.</para>
</abstract>
<para>Set to true when the host system is UNIX or UNIX like (i.e. APPLE and CYGWIN).</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOST_WIN32">
<title>CMAKE_HOST_WIN32</title>
<abstract>
<para>True on windows systems, including win64.</para>
</abstract>
<para>Set to true when the host system is Windows and on Cygwin.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LIBRARY_ARCHITECTURE">
<title>CMAKE_LIBRARY_ARCHITECTURE</title>
<abstract>
<para>Target architecture library directory name, if detected.</para>
</abstract>
<para>This is the value of CMAKE_&lt;lang&gt;_LIBRARY_ARCHITECTURE as detected for one of the enabled languages.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LIBRARY_ARCHITECTURE_REGEX">
<title>CMAKE_LIBRARY_ARCHITECTURE_REGEX</title>
<abstract>
<para>Regex matching possible target architecture library directory names.</para>
</abstract>
<para>This is used to detect CMAKE_&lt;lang&gt;_LIBRARY_ARCHITECTURE from the implicit linker search path by matching the &lt;arch&gt; name.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_OBJECT_PATH_MAX">
<title>CMAKE_OBJECT_PATH_MAX</title>
<abstract>
<para>Maximum object file full-path length allowed by native build tools.</para>
</abstract>
<para>CMake computes for every source file an object file name that is unique to the source file and deterministic with respect to the full path to the source file.  This allows multiple source files in a target to share the same name if they lie in different directories without rebuilding when one is added or removed.  However, it can produce long full paths in a few cases, so CMake shortens the path using a hashing scheme when the full path to an object file exceeds a limit.  CMake has a built-in limit for each platform that is sufficient for common tools, but some native tools may have a lower limit.  This variable may be set to specify the limit explicitly.  The value must be an integer no less than 128.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM">
<title>CMAKE_SYSTEM</title>
<abstract>
<para>Name of system cmake is compiling for.</para>
</abstract>
<para>This variable is the composite of CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_VERSION, like this ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}.  If CMAKE_SYSTEM_VERSION is not set, then CMAKE_SYSTEM is the same as CMAKE_SYSTEM_NAME.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_NAME">
<title>CMAKE_SYSTEM_NAME</title>
<abstract>
<para>Name of the OS CMake is building for.</para>
</abstract>
<para>This is the name of the operating system on which CMake is targeting.   On systems that have the uname command, this variable is set to the output of uname -s.  Linux, Windows,  and Darwin for Mac OS X are the values found  on the big three operating systems.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_PROCESSOR">
<title>CMAKE_SYSTEM_PROCESSOR</title>
<abstract>
<para>The name of the CPU CMake is building for.</para>
</abstract>
<para>On systems that support uname, this variable is set to the output of uname -p, on windows it is set to the value of the environment variable PROCESSOR_ARCHITECTURE</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SYSTEM_VERSION">
<title>CMAKE_SYSTEM_VERSION</title>
<abstract>
<para>OS version CMake is building for.</para>
</abstract>
<para>A numeric version string for the system, on systems that support uname, this variable is set to the output of uname -r. On other systems this is set to major-minor version numbers.</para>
</sect2>
<sect2 id="cpack.variable.CYGWIN">
<title>CYGWIN</title>
<abstract>
<para>True for Cygwin.</para>
</abstract>
<para>Set to true when using Cygwin.</para>
</sect2>
<sect2 id="cpack.variable.ENV">
<title>ENV</title>
<abstract>
<para>Access environment variables.</para>
</abstract>
<para>Use the syntax $ENV{VAR} to read environment variable VAR.  See also the set() command to set ENV{VAR}.</para>
</sect2>
<sect2 id="cpack.variable.MSVC">
<title>MSVC</title>
<abstract>
<para>True when using Microsoft Visual C</para>
</abstract>
<para>Set to true when the compiler is some version of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC10">
<title>MSVC10</title>
<abstract>
<para>True when using Microsoft Visual C 10.0</para>
</abstract>
<para>Set to true when the compiler is version 10.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC11">
<title>MSVC11</title>
<abstract>
<para>True when using Microsoft Visual C 11.0</para>
</abstract>
<para>Set to true when the compiler is version 11.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC12">
<title>MSVC12</title>
<abstract>
<para>True when using Microsoft Visual C 12.0</para>
</abstract>
<para>Set to true when the compiler is version 12.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC60">
<title>MSVC60</title>
<abstract>
<para>True when using Microsoft Visual C 6.0</para>
</abstract>
<para>Set to true when the compiler is version 6.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC70">
<title>MSVC70</title>
<abstract>
<para>True when using Microsoft Visual C 7.0</para>
</abstract>
<para>Set to true when the compiler is version 7.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC71">
<title>MSVC71</title>
<abstract>
<para>True when using Microsoft Visual C 7.1</para>
</abstract>
<para>Set to true when the compiler is version 7.1 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC80">
<title>MSVC80</title>
<abstract>
<para>True when using Microsoft Visual C 8.0</para>
</abstract>
<para>Set to true when the compiler is version 8.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC90">
<title>MSVC90</title>
<abstract>
<para>True when using Microsoft Visual C 9.0</para>
</abstract>
<para>Set to true when the compiler is version 9.0 of Microsoft Visual C.</para>
</sect2>
<sect2 id="cpack.variable.MSVC_IDE">
<title>MSVC_IDE</title>
<abstract>
<para>True when using the Microsoft Visual C IDE</para>
</abstract>
<para>Set to true when the target platform is the Microsoft Visual C IDE, as opposed to the command line compiler.</para>
</sect2>
<sect2 id="cpack.variable.MSVC_VERSION">
<title>MSVC_VERSION</title>
<abstract>
<para>The version of Microsoft Visual C/C++ being used if any.</para>
</abstract>
<para>Known version numbers are:
</para>
<para>
<programlisting>  1200 = VS  6.0
  1300 = VS  7.0
  1310 = VS  7.1
  1400 = VS  8.0
  1500 = VS  9.0
  1600 = VS 10.0
  1700 = VS 11.0
  1800 = VS 12.0
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.UNIX">
<title>UNIX</title>
<abstract>
<para>True for UNIX and UNIX like operating systems.</para>
</abstract>
<para>Set to true when the target system is UNIX or UNIX like (i.e. APPLE and CYGWIN).</para>
</sect2>
<sect2 id="cpack.variable.WIN32">
<title>WIN32</title>
<abstract>
<para>True on windows systems, including win64.</para>
</abstract>
<para>Set to true when the target system is Windows.</para>
</sect2>
<sect2 id="cpack.variable.XCODE_VERSION">
<title>XCODE_VERSION</title>
<abstract>
<para>Version of Xcode (Xcode generator only).</para>
</abstract>
<para>Under the Xcode generator, this is the version of Xcode as specified in "Xcode.app/Contents/version.plist" (such as "3.1.2").</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_common_to_all_CPack_generators">
<title>Variables common to all CPack generators</title>
<sect2 id="cpack.variable.CPACK_ABSOLUTE_DESTINATION_FILES">
<title>CPACK_ABSOLUTE_DESTINATION_FILES</title>
<abstract>
<para>List of files which have been installed using  an ABSOLUTE DESTINATION path.</para>
</abstract>
<para>This variable is a Read-Only variable which is set internally by CPack during installation and before packaging using CMAKE_ABSOLUTE_DESTINATION_FILES defined in cmake_install.cmake scripts. The value can be used within CPack project configuration file and/or CPack&lt;GEN&gt;.cmake file of &lt;GEN&gt; generator.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_BINARY__GENNAME_">
<title>CPACK_BINARY_&lt;GENNAME&gt;</title>
<abstract>
<para>CPack generated options for binary generators</para>
</abstract>
<para>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.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_CMAKE_GENERATOR">
<title>CPACK_CMAKE_GENERATOR</title>
<abstract>
<para>What CMake generator should be used if the project is CMake project.</para>
</abstract>
<para>Defaults to the value of CMAKE_GENERATOR few users will want to change this setting.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY">
<title>CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY</title>
<abstract>
<para>Boolean toggle to include/exclude top level directory (component case).</para>
</abstract>
<para>Similar usage as CPACK_INCLUDE_TOPLEVEL_DIRECTORY but for the component case. See CPACK_INCLUDE_TOPLEVEL_DIRECTORY documentation for the detail.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_CREATE_DESKTOP_LINKS">
<title>CPACK_CREATE_DESKTOP_LINKS</title>
<para>List of desktop links to create</para>
</sect2>
<sect2 id="cpack.variable.CPACK_GENERATOR">
<title>CPACK_GENERATOR</title>
<abstract>
<para>List of CPack generators to use</para>
</abstract>
<para>If not specified, CPack will create a set of options CPACK_BINARY_&lt;GENNAME&gt; (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:
</para>
<para>
<programlisting>    cpack -D CPACK_GENERATOR="ZIP;TGZ" /path/to/build/tree
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_INCLUDE_TOPLEVEL_DIRECTORY">
<title>CPACK_INCLUDE_TOPLEVEL_DIRECTORY</title>
<abstract>
<para>Boolean toggle to include/exclude top level directory.</para>
</abstract>
<para>When preparing a package CPack installs the item under the so-called top level directory. The purpose of is to include (set to 1 or ON or TRUE) the top level directory in the package or not (set to 0 or OFF or FALSE).
</para>
<para>Each CPack generator has a built-in default value for this variable. E.g. Archive generators (ZIP, TGZ, ...) includes the top level whereas RPM or DEB don't. The user may override the default value by setting this variable.
</para>
<para>There is a similar variable CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY which may be used to override the behavior for the component packaging case which may have different default value for historical (now backward compatibility) reason.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_INSTALLED_DIRECTORIES">
<title>CPACK_INSTALLED_DIRECTORIES</title>
<para>Extra directories to install</para>
</sect2>
<sect2 id="cpack.variable.CPACK_INSTALL_CMAKE_PROJECTS">
<title>CPACK_INSTALL_CMAKE_PROJECTS</title>
<abstract>
<para>List of four values that specify what project to install.</para>
</abstract>
<para>The four values are: Build directory, Project Name, Project Component, Directory. If omitted, CPack will build an installer that installers everything.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_INSTALL_COMMANDS">
<title>CPACK_INSTALL_COMMANDS</title>
<para>Extra commands to install components</para>
</sect2>
<sect2 id="cpack.variable.CPACK_INSTALL_SCRIPT">
<title>CPACK_INSTALL_SCRIPT</title>
<abstract>
<para>Extra CMake script provided by the user.</para>
</abstract>
<para>If set this CMake script will be executed by CPack during its local [CPack-private] installation which is done right before packaging the files. The script is not called by e.g.: make install.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_MONOLITHIC_INSTALL">
<title>CPACK_MONOLITHIC_INSTALL</title>
<abstract>
<para>Disables the component-based installation mechanism.</para>
</abstract>
<para>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_&lt;GENNAME&gt;_COMPONENT_INSTALL to 1/TRUE.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_OUTPUT_CONFIG_FILE">
<title>CPACK_OUTPUT_CONFIG_FILE</title>
<abstract>
<para>The name of the CPack binary configuration file.</para>
</abstract>
<para>This file is the CPack configuration generated by the CPack module for binary installers. Defaults to CPackConfig.cmake.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_DESCRIPTION_FILE">
<title>CPACK_PACKAGE_DESCRIPTION_FILE</title>
<abstract>
<para>A text file used to describe the project.</para>
</abstract>
<para>Used, for example, the introduction screen of a CPack-generated Windows installer to describe the project.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_DESCRIPTION_SUMMARY">
<title>CPACK_PACKAGE_DESCRIPTION_SUMMARY</title>
<para>Short description of the project (only a few words).</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_DIRECTORY">
<title>CPACK_PACKAGE_DIRECTORY</title>
<abstract>
<para>The directory in which CPack is doing its packaging.</para>
</abstract>
<para>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.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_EXECUTABLES">
<title>CPACK_PACKAGE_EXECUTABLES</title>
<abstract>
<para>Lists each of the executables and associated text label to be used to create Start Menu shortcuts.</para>
</abstract>
<para>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 NSIS and OSXX11 do).</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_FILE_NAME">
<title>CPACK_PACKAGE_FILE_NAME</title>
<abstract>
<para>The name of the package file to generate, not including the extension.</para>
</abstract>
<para>For example, cmake-2.6.1-Linux-i686. The default value is
</para>
<para>
<programlisting>  ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_ICON">
<title>CPACK_PACKAGE_ICON</title>
<para>A branding image that will be displayed inside the installer (used by GUI installers).</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_INSTALL_DIRECTORY">
<title>CPACK_PACKAGE_INSTALL_DIRECTORY</title>
<abstract>
<para>Installation directory on the target system.</para>
</abstract>
<para>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.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_INSTALL_REGISTRY_KEY">
<title>CPACK_PACKAGE_INSTALL_REGISTRY_KEY</title>
<abstract>
<para>Registry key used when installing this project.</para>
</abstract>
<para>This is only used by installer for Windows.   The default value is based on the installation directory.
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_NAME">
<title>CPACK_PACKAGE_NAME</title>
<abstract>
<para>The name of the package (or application)</para>
</abstract>
<para>If not specified, defaults to the project name.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_VENDOR">
<title>CPACK_PACKAGE_VENDOR</title>
<abstract>
<para>The name of the package vendor</para>
</abstract>
<para>(e.g., "Kitware").</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_VERSION">
<title>CPACK_PACKAGE_VERSION</title>
<abstract>
<para>Package full version, used internally</para>
</abstract>
<para>By default, this is built from CPACK_PACKAGE_VERSION_MAJOR, CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_VERSION_MAJOR">
<title>CPACK_PACKAGE_VERSION_MAJOR</title>
<para>Package major Version</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_VERSION_MINOR">
<title>CPACK_PACKAGE_VERSION_MINOR</title>
<para>Package minor Version</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGE_VERSION_PATCH">
<title>CPACK_PACKAGE_VERSION_PATCH</title>
<para>Package patch Version</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PACKAGING_INSTALL_PREFIX">
<title>CPACK_PACKAGING_INSTALL_PREFIX</title>
<abstract>
<para>The prefix used in the built package.</para>
</abstract>
<para>Each CPack generator has a default value (like /usr). This default value may be overwritten from the CMakeLists.txt or the cpack command line by setting an alternative value.
</para>
<para>e.g.  set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
</para>
<para>This is not the same purpose as CMAKE_INSTALL_PREFIX which is used when installing from the build tree without building a package.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_PROJECT_CONFIG_FILE">
<title>CPACK_PROJECT_CONFIG_FILE</title>
<abstract>
<para>CPack-time project CPack configuration file.</para>
</abstract>
<para>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.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RESOURCE_FILE_LICENSE">
<title>CPACK_RESOURCE_FILE_LICENSE</title>
<abstract>
<para>License to be embedded in the installer</para>
</abstract>
<para>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.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RESOURCE_FILE_README">
<title>CPACK_RESOURCE_FILE_README</title>
<abstract>
<para>ReadMe file to be embedded in the installer</para>
</abstract>
<para>It typically describes in some detail the purpose of the project during the installation. Not all CPack generators uses this file.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RESOURCE_FILE_WELCOME">
<title>CPACK_RESOURCE_FILE_WELCOME</title>
<abstract>
<para>Welcome file to be embedded in the installer.</para>
</abstract>
<para>It welcomes users to this installer. Typically used in the graphical installers on Windows and Mac OS X.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SET_DESTDIR">
<title>CPACK_SET_DESTDIR</title>
<abstract>
<para>Boolean toggle to make CPack use DESTDIR mechanism when packaging.</para>
</abstract>
<para>DESTDIR means DESTination DIRectory. It is commonly used by makefile users in order to install software at non-default location. It is a basic relocation mechanism that should not be used on Windows (see CMAKE_INSTALL_PREFIX documentation). It is usually invoked like this:
</para>
<para>
<programlisting> make DESTDIR=/home/john install
</programlisting>
</para>
<para>which will install the concerned software using the installation prefix, e.g. "/usr/local" prepended with the DESTDIR value which finally gives "/home/john/usr/local". When preparing a package, CPack first installs the items to be packaged in a local (to the build tree) directory by using the same DESTDIR mechanism. Nevertheless, if CPACK_SET_DESTDIR is set then CPack will set DESTDIR before doing the local install. The most noticeable difference is that without CPACK_SET_DESTDIR, CPack uses CPACK_PACKAGING_INSTALL_PREFIX as a prefix whereas with CPACK_SET_DESTDIR set, CPack will use CMAKE_INSTALL_PREFIX as a prefix.
</para>
<para>Manually setting CPACK_SET_DESTDIR may help (or simply be necessary) if some install rules uses absolute DESTINATION (see CMake INSTALL command). However, starting with CPack/CMake 2.8.3 RPM and DEB installers tries to handle DESTDIR automatically so that it is seldom necessary for the user to set it.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SOURCE_GENERATOR">
<title>CPACK_SOURCE_GENERATOR</title>
<abstract>
<para>List of generators used for the source packages.</para>
</abstract>
<para>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.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SOURCE_IGNORE_FILES">
<title>CPACK_SOURCE_IGNORE_FILES</title>
<abstract>
<para>Pattern of files in the source tree that won't be packaged when building a source package.</para>
</abstract>
<para>This is a list of regular expression patterns (that must be properly escaped), e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SOURCE_OUTPUT_CONFIG_FILE">
<title>CPACK_SOURCE_OUTPUT_CONFIG_FILE</title>
<abstract>
<para>The name of the CPack source configuration file.</para>
</abstract>
<para>This file is the CPack configuration generated by the CPack module for source installers. Defaults to CPackSourceConfig.cmake.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SOURCE_PACKAGE_FILE_NAME">
<title>CPACK_SOURCE_PACKAGE_FILE_NAME</title>
<abstract>
<para>The name of the source package</para>
</abstract>
<para>For example cmake-2.6.1.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SOURCE_STRIP_FILES">
<title>CPACK_SOURCE_STRIP_FILES</title>
<abstract>
<para>List of files in the source tree that will be stripped.</para>
</abstract>
<para>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).</para>
</sect2>
<sect2 id="cpack.variable.CPACK_STRIP_FILES">
<title>CPACK_STRIP_FILES</title>
<abstract>
<para>List of files to be stripped</para>
</abstract>
<para>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).</para>
</sect2>
<sect2 id="cpack.variable.CPACK_SYSTEM_NAME">
<title>CPACK_SYSTEM_NAME</title>
<para>System name, defaults to the value of ${CMAKE_SYSTEM_NAME}.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_TOPLEVEL_TAG">
<title>CPACK_TOPLEVEL_TAG</title>
<para>Directory for the installed files</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION">
<title>CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION</title>
<abstract>
<para>Ask CPack to warn each time a file with absolute INSTALL DESTINATION is encountered.</para>
</abstract>
<para>This variable triggers the definition of CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs cmake_install.cmake scripts.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_concerning_CPack_Components">
<title>Variables concerning CPack Components</title>
<sect2 id="cpack.variable.CPACK__GENNAME__COMPONENT_INSTALL">
<title>CPACK_&lt;GENNAME&gt;_COMPONENT_INSTALL</title>
<abstract>
<para>Enable/Disable component install for CPack generator &lt;GENNAME&gt;.</para>
</abstract>
<para>Each CPack Generator (RPM, DEB, ARCHIVE, NSIS, DMG, etc...) has a legacy default behavior. e.g. RPM builds monolithic whereas NSIS builds component. One can change the default behavior by setting this variable to 0/1 or OFF/ON.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENTS_ALL">
<title>CPACK_COMPONENTS_ALL</title>
<abstract>
<para>The list of component to install</para>
</abstract>
<para>The default value of this variable is computed by CPack and contains all components defined by the project. The user may set it to only include the specified components.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENTS_GROUPING">
<title>CPACK_COMPONENTS_GROUPING</title>
<abstract>
<para>Specify how components are grouped for multi-package component-aware CPack generators.</para>
</abstract>
<para>Some generators like RPM or ARCHIVE family (TGZ, ZIP, ...) generates several packages files when asked for component packaging. They group the component differently depending on the value of this variable:
</para>
<para>
<programlisting>  - ONE_PER_GROUP (default): creates one package file per component group
  - ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) component
  - IGNORE : creates one package per component, i.e. IGNORE component group
</programlisting>
</para>
<para>One can specify different grouping for different CPack generator by using a CPACK_PROJECT_CONFIG_FILE.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENT__compName__DEPENDS">
<title>CPACK_COMPONENT_&lt;compName&gt;_DEPENDS</title>
<para>The dependencies (list of components) on which this component depends.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENT__compName__DESCRIPTION">
<title>CPACK_COMPONENT_&lt;compName&gt;_DESCRIPTION</title>
<para>The description of a component</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENT__compName__DISPLAY_NAME">
<title>CPACK_COMPONENT_&lt;compName&gt;_DISPLAY_NAME</title>
<para>The name to be displayed for a component</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENT__compName__GROUP">
<title>CPACK_COMPONENT_&lt;compName&gt;_GROUP</title>
<para>The group of a component</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMPONENT__compName__REQUIRED">
<title>CPACK_COMPONENT_&lt;compName&gt;_REQUIRED</title>
<para>True is this component is required</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_for_Languages">
<title>Variables for Languages</title>
<sect2 id="cpack.variable.CMAKE__LANG__ARCHIVE_APPEND">
<title>CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND</title>
<abstract>
<para>Rule variable to append to a static archive.</para>
</abstract>
<para>This is a rule variable that tells CMake how to append to a static archive.  It is used in place of CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY on some platforms in order to support large object counts.  See also CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE and CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__ARCHIVE_CREATE">
<title>CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE</title>
<abstract>
<para>Rule variable to create a new static archive.</para>
</abstract>
<para>This is a rule variable that tells CMake how to create a static archive.  It is used in place of CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY on some platforms in order to support large object counts.  See also CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND and CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__ARCHIVE_FINISH">
<title>CMAKE_&lt;LANG&gt;_ARCHIVE_FINISH</title>
<abstract>
<para>Rule variable to finish an existing static archive.</para>
</abstract>
<para>This is a rule variable that tells CMake how to finish a static archive.  It is used in place of CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY on some platforms in order to support large object counts.  See also CMAKE_&lt;LANG&gt;_ARCHIVE_CREATE and CMAKE_&lt;LANG&gt;_ARCHIVE_APPEND.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__COMPILER">
<title>CMAKE_&lt;LANG&gt;_COMPILER</title>
<abstract>
<para>The full path to the compiler for LANG.</para>
</abstract>
<para>This is the command that will be used as the &lt;LANG&gt; compiler.  Once set, you can not change this variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__COMPILER_ABI">
<title>CMAKE_&lt;LANG&gt;_COMPILER_ABI</title>
<abstract>
<para>An internal variable subject to change.</para>
</abstract>
<para>This is used in determining the compiler ABI and is subject to change.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__COMPILER_ID">
<title>CMAKE_&lt;LANG&gt;_COMPILER_ID</title>
<abstract>
<para>Compiler identification string.</para>
</abstract>
<para>A short string unique to the compiler vendor.  Possible values include:
</para>
<para>
<programlisting>  Absoft = Absoft Fortran (absoft.com)
  ADSP = Analog VisualDSP++ (analog.com)
  Clang = LLVM Clang (clang.llvm.org)
  Cray = Cray Compiler (cray.com)
  Embarcadero, Borland = Embarcadero (embarcadero.com)
  G95 = G95 Fortran (g95.org)
  GNU = GNU Compiler Collection (gcc.gnu.org)
  HP = Hewlett-Packard Compiler (hp.com)
  Intel = Intel Compiler (intel.com)
  MIPSpro = SGI MIPSpro (sgi.com)
  MSVC = Microsoft Visual Studio (microsoft.com)
  PGI = The Portland Group (pgroup.com)
  PathScale = PathScale (pathscale.com)
  SDCC = Small Device C Compiler (sdcc.sourceforge.net)
  SunPro = Oracle Solaris Studio (oracle.com)
  TI = Texas Instruments (ti.com)
  TinyCC = Tiny C Compiler (tinycc.org)
  Watcom = Open Watcom (openwatcom.org)
  XL, VisualAge, zOS = IBM XL (ibm.com)
</programlisting>
</para>
<para>This variable is not guaranteed to be defined for all compilers or languages.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__COMPILER_LOADED">
<title>CMAKE_&lt;LANG&gt;_COMPILER_LOADED</title>
<abstract>
<para>Defined to true if the language is enabled.</para>
</abstract>
<para>When language &lt;LANG&gt; is enabled by project() or enable_language() this variable is defined to 1.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__COMPILER_VERSION">
<title>CMAKE_&lt;LANG&gt;_COMPILER_VERSION</title>
<abstract>
<para>Compiler version string.</para>
</abstract>
<para>Compiler version in major[.minor[.patch[.tweak]]] format.  This variable is not guaranteed to be defined for all compilers or languages.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__COMPILE_OBJECT">
<title>CMAKE_&lt;LANG&gt;_COMPILE_OBJECT</title>
<abstract>
<para>Rule variable to compile a single object file.</para>
</abstract>
<para>This is a rule variable that tells CMake how to compile a single object file for the language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__CREATE_SHARED_LIBRARY">
<title>CMAKE_&lt;LANG&gt;_CREATE_SHARED_LIBRARY</title>
<abstract>
<para>Rule variable to create a shared library.</para>
</abstract>
<para>This is a rule variable that tells CMake how to create a shared library for the language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__CREATE_SHARED_MODULE">
<title>CMAKE_&lt;LANG&gt;_CREATE_SHARED_MODULE</title>
<abstract>
<para>Rule variable to create a shared module.</para>
</abstract>
<para>This is a rule variable that tells CMake how to create a shared library for the language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__CREATE_STATIC_LIBRARY">
<title>CMAKE_&lt;LANG&gt;_CREATE_STATIC_LIBRARY</title>
<abstract>
<para>Rule variable to create a static library.</para>
</abstract>
<para>This is a rule variable that tells CMake how to create a static library for the language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__FLAGS">
<title>CMAKE_&lt;LANG&gt;_FLAGS</title>
<abstract>
<para>Flags for all build types.</para>
</abstract>
<para>&lt;LANG&gt; flags used regardless of the value of CMAKE_BUILD_TYPE.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__FLAGS_DEBUG">
<title>CMAKE_&lt;LANG&gt;_FLAGS_DEBUG</title>
<abstract>
<para>Flags for Debug build type or configuration.</para>
</abstract>
<para>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is Debug.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__FLAGS_MINSIZEREL">
<title>CMAKE_&lt;LANG&gt;_FLAGS_MINSIZEREL</title>
<abstract>
<para>Flags for MinSizeRel build type or configuration.</para>
</abstract>
<para>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is MinSizeRel.Short for minimum size release.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__FLAGS_RELEASE">
<title>CMAKE_&lt;LANG&gt;_FLAGS_RELEASE</title>
<abstract>
<para>Flags for Release build type or configuration.</para>
</abstract>
<para>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is Release</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__FLAGS_RELWITHDEBINFO">
<title>CMAKE_&lt;LANG&gt;_FLAGS_RELWITHDEBINFO</title>
<abstract>
<para>Flags for RelWithDebInfo type or configuration.</para>
</abstract>
<para>&lt;LANG&gt; flags used when CMAKE_BUILD_TYPE is RelWithDebInfo.  Short for Release With Debug Information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__IGNORE_EXTENSIONS">
<title>CMAKE_&lt;LANG&gt;_IGNORE_EXTENSIONS</title>
<abstract>
<para>File extensions that should be ignored by the build.</para>
</abstract>
<para>This is a list of file extensions that may be part of a project for a given language but are not compiled.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__IMPLICIT_INCLUDE_DIRECTORIES">
<title>CMAKE_&lt;LANG&gt;_IMPLICIT_INCLUDE_DIRECTORIES</title>
<abstract>
<para>Directories implicitly searched by the compiler for header files.</para>
</abstract>
<para>CMake does not explicitly specify these directories on compiler command lines for language &lt;LANG&gt;.  This prevents system include directories from being treated as user include directories on some compilers.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__IMPLICIT_LINK_DIRECTORIES">
<title>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_DIRECTORIES</title>
<abstract>
<para>Implicit linker search path detected for language &lt;LANG&gt;.</para>
</abstract>
<para>Compilers typically pass directories containing language runtime libraries and default library search paths when they invoke a linker.  These paths are implicit linker search directories for the compiler's language.  CMake automatically detects these directories for each language and reports the results in this variable.
</para>
<para>When a library in one of these directories is given by full path to target_link_libraries() CMake will generate the -l&lt;name&gt; form on link lines to ensure the linker searches its implicit directories for the library.  Note that some toolchains read implicit directories from an environment variable such as LIBRARY_PATH so keep its value consistent when operating in a given build tree.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__IMPLICIT_LINK_FRAMEWORK_DIRECTORIES">
<title>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES</title>
<abstract>
<para>Implicit linker framework search path detected for language &lt;LANG&gt;.</para>
</abstract>
<para>These paths are implicit linker framework search directories for the compiler's language.  CMake automatically detects these directories for each language and reports the results in this variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__IMPLICIT_LINK_LIBRARIES">
<title>CMAKE_&lt;LANG&gt;_IMPLICIT_LINK_LIBRARIES</title>
<abstract>
<para>Implicit link libraries and flags detected for language &lt;LANG&gt;.</para>
</abstract>
<para>Compilers typically pass language runtime library names and other flags when they invoke a linker.  These flags are implicit link options for the compiler's language.  CMake automatically detects these libraries and flags for each language and reports the results in this variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__LIBRARY_ARCHITECTURE">
<title>CMAKE_&lt;LANG&gt;_LIBRARY_ARCHITECTURE</title>
<abstract>
<para>Target architecture library directory name detected for &lt;lang&gt;.</para>
</abstract>
<para>If the &lt;lang&gt; compiler passes to the linker an architecture-specific system library search directory such as &lt;prefix&gt;/lib/&lt;arch&gt; this variable contains the &lt;arch&gt; name if/as detected by CMake.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__LINKER_PREFERENCE">
<title>CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE</title>
<abstract>
<para>Preference value for linker language selection.</para>
</abstract>
<para>The "linker language" for executable, shared library, and module targets is the language whose compiler will invoke the linker.  The LINKER_LANGUAGE target property sets the language explicitly.  Otherwise, the linker language is that whose linker preference value is highest among languages compiled and linked into the target.  See also the CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE_PROPAGATES variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__LINKER_PREFERENCE_PROPAGATES">
<title>CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE_PROPAGATES</title>
<abstract>
<para>True if CMAKE_&lt;LANG&gt;_LINKER_PREFERENCE propagates across targets.</para>
</abstract>
<para>This is used when CMake selects a linker language for a target.  Languages compiled directly into the target are always considered.  A language compiled into static libraries linked by the target is considered if this variable is true.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__LINK_EXECUTABLE_">
<title>CMAKE_&lt;LANG&gt;_LINK_EXECUTABLE </title>
<abstract>
<para>Rule variable to link an executable.</para>
</abstract>
<para>Rule variable to link an executable for the given language.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__OUTPUT_EXTENSION">
<title>CMAKE_&lt;LANG&gt;_OUTPUT_EXTENSION</title>
<abstract>
<para>Extension for the output of a compile for a single file.</para>
</abstract>
<para>This is the extension for an object file for the given &lt;LANG&gt;. For example .obj for C on Windows.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__PLATFORM_ID">
<title>CMAKE_&lt;LANG&gt;_PLATFORM_ID</title>
<abstract>
<para>An internal variable subject to change.</para>
</abstract>
<para>This is used in determining the platform and is subject to change.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__SIZEOF_DATA_PTR">
<title>CMAKE_&lt;LANG&gt;_SIZEOF_DATA_PTR</title>
<abstract>
<para>Size of pointer-to-data types for language &lt;LANG&gt;.</para>
</abstract>
<para>This holds the size (in bytes) of pointer-to-data types in the target platform ABI.  It is defined for languages C and CXX (C++).</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__SOURCE_FILE_EXTENSIONS">
<title>CMAKE_&lt;LANG&gt;_SOURCE_FILE_EXTENSIONS</title>
<abstract>
<para>Extensions of source files for the given language.</para>
</abstract>
<para>This is the list of extensions for a given language's source files.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_COMPILER_IS_GNU_LANG_">
<title>CMAKE_COMPILER_IS_GNU&lt;LANG&gt;</title>
<abstract>
<para>True if the compiler is GNU.</para>
</abstract>
<para>If the selected &lt;LANG&gt; compiler is the GNU compiler then this is TRUE, if not it is FALSE.  Unlike the other per-language variables, this uses the GNU syntax for identifying languages instead of the CMake syntax. Recognized values of the &lt;LANG&gt; suffix are:
</para>
<para>
<programlisting>  CC = C compiler
  CXX = C++ compiler
  G77 = Fortran compiler</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_Fortran_MODDIR_DEFAULT">
<title>CMAKE_Fortran_MODDIR_DEFAULT</title>
<abstract>
<para>Fortran default module output directory.</para>
</abstract>
<para>Most Fortran compilers write .mod files to the current working directory.  For those that do not, this is set to "." and used when the Fortran_MODULE_DIRECTORY target property is not set.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_Fortran_MODDIR_FLAG">
<title>CMAKE_Fortran_MODDIR_FLAG</title>
<abstract>
<para>Fortran flag for module output directory.</para>
</abstract>
<para>This stores the flag needed to pass the value of the Fortran_MODULE_DIRECTORY target property to the compiler.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_Fortran_MODOUT_FLAG">
<title>CMAKE_Fortran_MODOUT_FLAG</title>
<abstract>
<para>Fortran flag to enable module output.</para>
</abstract>
<para>Most Fortran compilers write .mod files out by default.  For others, this stores the flag needed to enable module output.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INTERNAL_PLATFORM_ABI">
<title>CMAKE_INTERNAL_PLATFORM_ABI</title>
<abstract>
<para>An internal variable subject to change.</para>
</abstract>
<para>This is used in determining the compiler ABI and is subject to change.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_USER_MAKE_RULES_OVERRIDE__LANG_">
<title>CMAKE_USER_MAKE_RULES_OVERRIDE_&lt;LANG&gt;</title>
<abstract>
<para>Specify a CMake file that overrides platform information for &lt;LANG&gt;.</para>
</abstract>
<para>This is a language-specific version of CMAKE_USER_MAKE_RULES_OVERRIDE loaded only when enabling language &lt;LANG&gt;.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_Bundle_generator">
<title>Variables specific to CPack Bundle generator</title>
<sect2 id="cpack.variable.CPACK_BUNDLE_ICON">
<title>CPACK_BUNDLE_ICON</title>
<abstract>
<para>Path to an OSX icon file that will be used as the icon for the generated bundle.</para>
</abstract>
<para>This is the icon that appears in the OSX finder for the bundle, and in the OSX dock when the bundle is opened. Required.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_BUNDLE_NAME">
<title>CPACK_BUNDLE_NAME</title>
<abstract>
<para>The name of the generated bundle</para>
</abstract>
<para>This appears in the OSX finder as the bundle name. Required.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_BUNDLE_PLIST">
<title>CPACK_BUNDLE_PLIST</title>
<abstract>
<para>Path to an OSX plist file that will be used for the generated bundle.</para>
</abstract>
<para>This assumes that the caller has generated or specified their own Info.plist file. Required.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_BUNDLE_STARTUP_COMMAND">
<title>CPACK_BUNDLE_STARTUP_COMMAND</title>
<abstract>
<para>Path to a startup script</para>
</abstract>
<para>This is a path to an executable or script that will be run whenever an end-user double-clicks the generated bundle in the OSX Finder. Optional.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_Cygwin_generator">
<title>Variables specific to CPack Cygwin generator</title>
<sect2 id="cpack.variable.CPACK_CYGWIN_BUILD_SCRIPT">
<title>CPACK_CYGWIN_BUILD_SCRIPT</title>
<abstract>
<para>The Cygwin build script</para>
</abstract>
<para>
<programlisting>   FIXME: This documentation is incomplete.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_CYGWIN_PATCH_FILE">
<title>CPACK_CYGWIN_PATCH_FILE</title>
<abstract>
<para>The Cygwin patch file</para>
</abstract>
<para>
<programlisting>   FIXME: This documentation is incomplete.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_CYGWIN_PATCH_NUMBER">
<title>CPACK_CYGWIN_PATCH_NUMBER</title>
<abstract>
<para>The Cygwin patch number</para>
</abstract>
<para>
<programlisting>   FIXME: This documentation is incomplete.
</programlisting>
</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_Debian__DEB__generator">
<title>Variables specific to CPack Debian (DEB) generator</title>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_ARCHITECTURE">
<title>CPACK_DEBIAN_PACKAGE_ARCHITECTURE</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : Output of dpkg --print-architecture (or i386 if dpkg is not found)
     The debian package architecture
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_BREAKS">
<title>CPACK_DEBIAN_PACKAGE_BREAKS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     When one binary package declares that it breaks another, dpkg will refuse to allow the
     package which declares Breaks be installed unless the broken package is deconfigured first,
     and it will refuse to allow the broken package to be reconfigured.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_CONFLICTS">
<title>CPACK_DEBIAN_PACKAGE_CONFLICTS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     When one binary package declares a conflict with another using a Conflicts field,
     dpkg will refuse to allow them to be installed on the system at the same time.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA">
<title>CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     This variable allow advanced user to add custom script to the control.tar.gz
     Typical usage is for conffiles, postinst, postrm, prerm.
     Usage: set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
            "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_DEBUG">
<title>CPACK_DEBIAN_PACKAGE_DEBUG</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be set when invoking cpack in order to trace debug information
     during CPackDeb run.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_DEPENDS">
<title>CPACK_DEBIAN_PACKAGE_DEPENDS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to set deb dependencies.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_DESCRIPTION">
<title>CPACK_DEBIAN_PACKAGE_DESCRIPTION</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
     The debian package description
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_ENHANCES">
<title>CPACK_DEBIAN_PACKAGE_ENHANCES</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     This field is similar to Suggests but works in the opposite direction.
     It is used to declare that a package can enhance the functionality of another package.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_HOMEPAGE">
<title>CPACK_DEBIAN_PACKAGE_HOMEPAGE</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     The URL of the web site for this package, preferably (when applicable) the
     site from which the original source can be obtained and any additional
     upstream documentation or information may be found.
     The content of this field is a simple URL without any surrounding
     characters such as &lt;&gt;.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_MAINTAINER">
<title>CPACK_DEBIAN_PACKAGE_MAINTAINER</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_CONTACT
     The debian package maintainer
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_NAME">
<title>CPACK_DEBIAN_PACKAGE_NAME</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_NAME (lower case)
     The debian package summary
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_PREDEPENDS">
<title>CPACK_DEBIAN_PACKAGE_PREDEPENDS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     This field is like Depends, except that it also forces dpkg to complete installation of
     the packages named before even starting the installation of the package which declares
     the pre-dependency.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_PRIORITY">
<title>CPACK_DEBIAN_PACKAGE_PRIORITY</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : 'optional'
     The debian package priority
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_PROVIDES">
<title>CPACK_DEBIAN_PACKAGE_PROVIDES</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     A virtual package is one which appears in the Provides control field of another package.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_RECOMMENDS">
<title>CPACK_DEBIAN_PACKAGE_RECOMMENDS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     Allows packages to declare a strong, but not absolute, dependency on other packages.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_REPLACES">
<title>CPACK_DEBIAN_PACKAGE_REPLACES</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     Packages can declare in their control file that they should overwrite
     files in certain other packages, or completely replace other packages.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_SECTION">
<title>CPACK_DEBIAN_PACKAGE_SECTION</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : 'devel'
     The debian package section
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_SHLIBDEPS">
<title>CPACK_DEBIAN_PACKAGE_SHLIBDEPS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : OFF
     May be set to ON in order to use dpkg-shlibdeps to generate
     better package dependency list.
     You may need set CMAKE_INSTALL_RPATH toi appropriate value
     if you use this feature, because if you don't dpkg-shlibdeps
     may fail to find your own shared libs.
     See <ulink url="http://www.cmake.org/Wiki/CMake_RPATH_handling." />
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_SUGGESTS">
<title>CPACK_DEBIAN_PACKAGE_SUGGESTS</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     see <ulink url="http://www.debian.org/doc/debian-policy/ch-relationships.html" />#s-binarydeps
     Allows packages to declare a suggested package install grouping.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DEBIAN_PACKAGE_VERSION">
<title>CPACK_DEBIAN_PACKAGE_VERSION</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_VERSION
     The debian package version
</programlisting>
</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_DragNDrop_generator">
<title>Variables specific to CPack DragNDrop generator</title>
<sect2 id="cpack.variable.CPACK_COMMAND_HDIUTIL">
<title>CPACK_COMMAND_HDIUTIL</title>
<abstract>
<para>Path to the hdiutil(1) command used to operate on disk image files on Mac OS X.</para>
</abstract>
<para>This variable can be used to override the automatically detected command (or specify its location if the auto-detection fails to find it.)</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMMAND_REZ">
<title>CPACK_COMMAND_REZ</title>
<abstract>
<para>Path to the Rez(1) command used to compile resources on Mac OS X.</para>
</abstract>
<para>This variable can be used to override the automatically detected command (or specify its location if the auto-detection fails to find it.)</para>
</sect2>
<sect2 id="cpack.variable.CPACK_COMMAND_SETFILE">
<title>CPACK_COMMAND_SETFILE</title>
<abstract>
<para>Path to the SetFile(1) command used to set extended attributes on files and directories on Mac OS X.</para>
</abstract>
<para>This variable can be used to override the automatically detected command (or specify its location if the auto-detection fails to find it.)</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DMG_BACKGROUND_IMAGE">
<title>CPACK_DMG_BACKGROUND_IMAGE</title>
<abstract>
<para>Path to a background image file</para>
</abstract>
<para>This file will be used as the background for the Finder Window when the disk image is opened.  By default no background image is set. The background image is applied after applying the custom .DS_Store file.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DMG_DS_STORE">
<title>CPACK_DMG_DS_STORE</title>
<abstract>
<para>Path to a custom DS_Store file</para>
</abstract>
<para>This .DS_Store file e.g. can be used to specify the Finder window position/geometry and layout (such as hidden toolbars, placement of the icons etc.). This file has to be generated by the Finder (either manually or through OSA-script) using a normal folder from which the .DS_Store file can then be extracted.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DMG_FORMAT">
<title>CPACK_DMG_FORMAT</title>
<abstract>
<para>The disk image format</para>
</abstract>
<para>Common values are UDRO (UDIF read-only), UDZO (UDIF zlib-compressed) or UDBZ (UDIF bzip2-compressed). Refer to hdiutil(1) for more information on other available formats.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_DMG_VOLUME_NAME">
<title>CPACK_DMG_VOLUME_NAME</title>
<abstract>
<para>The volume name of the generated disk image.</para>
</abstract>
<para>Defaults to CPACK_PACKAGE_FILE_NAME.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_NSIS_generator">
<title>Variables specific to CPack NSIS generator</title>
<sect2 id="cpack.variable.CPACK_NSIS_COMPRESSOR">
<title>CPACK_NSIS_COMPRESSOR</title>
<para>The arguments that will be passed to the NSIS SetCompressor command.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_CONTACT">
<title>CPACK_NSIS_CONTACT</title>
<para>Contact information for questions and comments about the installation process.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_CREATE_ICONS_EXTRA">
<title>CPACK_NSIS_CREATE_ICONS_EXTRA</title>
<para>Additional NSIS commands for creating start menu shortcuts.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_DELETE_ICONS_EXTRA">
<title>CPACK_NSIS_DELETE_ICONS_EXTRA</title>
<para>Additional NSIS commands to uninstall start menu shortcuts.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_DISPLAY_NAME">
<title>CPACK_NSIS_DISPLAY_NAME</title>
<para>The display name string that appears in   the Windows Add/Remove Program control panel
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL">
<title>CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL</title>
<abstract>
<para>Ask about uninstalling previous versions first.</para>
</abstract>
<para>
<programlisting>   If this is set to "ON", then an installer will look for previous
   installed versions and if one is found, ask the user whether to
   uninstall it before proceeding with the install.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_EXECUTABLES_DIRECTORY">
<title>CPACK_NSIS_EXECUTABLES_DIRECTORY</title>
<abstract>
<para>Creating NSIS start menu links assumes that they are in 'bin' unless this variable is set.</para>
</abstract>
<para>
<programlisting>   For example, you would set this to 'exec' if your executables are
   in an exec directory.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_EXTRA_INSTALL_COMMANDS">
<title>CPACK_NSIS_EXTRA_INSTALL_COMMANDS</title>
<para>Extra NSIS commands that   will be added to the end of the install Section, after your
</para>
<para>
<programlisting> install tree is available on the target system.</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS">
<title>CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS</title>
<para>Extra NSIS commands that   will be added to the beginning of the install Section, before your
</para>
<para>
<programlisting> install tree is available on the target system.</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS">
<title>CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS</title>
<para>Extra NSIS commands that will   be added to the uninstall Section, before your install tree is
</para>
<para>
<programlisting> removed from the target system.</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_HELP_LINK">
<title>CPACK_NSIS_HELP_LINK</title>
<para>URL to a web site providing assistance in installing your application.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_INSTALLED_ICON_NAME">
<title>CPACK_NSIS_INSTALLED_ICON_NAME</title>
<para>A path to the executable that contains the installer icon.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_INSTALLER_MUI_ICON_CODE">
<title>CPACK_NSIS_INSTALLER_MUI_ICON_CODE</title>
<para>undocumented</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_INSTALL_ROOT">
<title>CPACK_NSIS_INSTALL_ROOT</title>
<abstract>
<para>The default installation directory presented to the end user by the NSIS installer is under this root dir.</para>
</abstract>
<para>The full   directory presented to the end user is:
</para>
<para>
<programlisting>   ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_MENU_LINKS">
<title>CPACK_NSIS_MENU_LINKS</title>
<abstract>
<para>Specify links in [application] menu</para>
</abstract>
<para>
<programlisting>   This should contain a list of pair "link" "link name". The link
   may be an URL or a path relative to installation prefix.
   Like:
     set(CPACK_NSIS_MENU_LINKS
         "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help"
         "<ulink url="http://www.cmake.org" />" "CMake Web Site")
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_MODIFY_PATH">
<title>CPACK_NSIS_MODIFY_PATH</title>
<abstract>
<para>Modify PATH toggle</para>
</abstract>
<para>
<programlisting>   If this is set to "ON", then an extra page
   will appear in the installer that will allow the user to choose
   whether the program directory should be added to the system PATH
   variable.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_MUI_FINISHPAGE_RUN">
<title>CPACK_NSIS_MUI_FINISHPAGE_RUN</title>
<para>Specify an executable to add an option to run on the finish page of the NSIS installer.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_MUI_ICON">
<title>CPACK_NSIS_MUI_ICON</title>
<abstract>
<para>An icon filename</para>
</abstract>
<para>
<programlisting>   The name of a *.ico file used as the main icon for the generated
   install program.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_MUI_UNIICON">
<title>CPACK_NSIS_MUI_UNIICON</title>
<abstract>
<para>An icon filename</para>
</abstract>
<para>
<programlisting>   The name of a *.ico file used as the main icon for the generated
   uninstall program.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_PACKAGE_NAME">
<title>CPACK_NSIS_PACKAGE_NAME</title>
<para>The title displayed at the top of the installer.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_NSIS_URL_INFO_ABOUT">
<title>CPACK_NSIS_URL_INFO_ABOUT</title>
<para>URL to a web site providing more information about your application.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_PackageMaker_generator">
<title>Variables specific to CPack PackageMaker generator</title>
<sect2 id="cpack.variable.CPACK_OSX_PACKAGE_VERSION">
<title>CPACK_OSX_PACKAGE_VERSION</title>
<abstract>
<para>The version of Mac OS X that the resulting PackageMaker archive should be compatible with.</para>
</abstract>
<para>Different versions of Mac OS X support different features. For example, CPack can only build component-based installers for Mac OS X 10.4 or newer, and can only build installers that download component son-the-fly for Mac OS X 10.5 or newer. If left blank, this value will be set to the minimum version of Mac OS X that supports the requested features. Set this variable to some value (e.g., 10.4) only if you want to guarantee that your installer will work on that version of Mac OS X, and don't mind missing extra features available in the installer shipping with later versions of Mac OS X.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_RPM_generator">
<title>Variables specific to CPack RPM generator</title>
<sect2 id="cpack.variable.CPACK_RPM_CHANGELOG_FILE">
<title>CPACK_RPM_CHANGELOG_FILE</title>
<abstract>
<para>RPM changelog file</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to embed a changelog in the spec file.
     The refered file will be read and directly put after the %changelog
     section.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_COMPRESSION_TYPE">
<title>CPACK_RPM_COMPRESSION_TYPE</title>
<abstract>
<para>RPM compression type</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to override RPM compression type to be used
     to build the RPM. For example some Linux distribution now default
     to lzma or xz compression whereas older cannot use such RPM.
     Using this one can enforce compression type to be used.
     Possible value are: lzma, xz, bzip2 and gzip.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST">
<title>CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST</title>
<abstract>
<para>list of path to be excluded</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include
     May be used to exclude path (directories or files) from the auto-generated
     list of paths discovered by CPack RPM. The defaut value contains a reasonable
     set of values if the variable is not defined by the user. If the variable
     is defined by the user then CPackRPM will NOT any of the default path.
     If you want to add some path to the default list then you can use
     CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION variable.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION">
<title>CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION</title>
<abstract>
<para>additional list of path to be excluded</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to add more exclude path (directories or files) from the initial
     default list of excluded paths. See CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE">
<title>CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE</title>
<abstract>
<para>Spec file template</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     If set CPack will generate a template for USER specified binary
     spec file and stop with an error. For example launch CPack like this
     cpack -D CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE=1 -G RPM
     The user may then use this file in order to hand-craft is own
     binary spec file which may be used with CPACK_RPM_USER_BINARY_SPECFILE.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_ARCHITECTURE">
<title>CPACK_RPM_PACKAGE_ARCHITECTURE</title>
<abstract>
<para>The RPM package architecture</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     This may be set to "noarch" if you
     know you are building a noarch package.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_DEBUG">
<title>CPACK_RPM_PACKAGE_DEBUG</title>
<abstract>
<para>Toggle CPackRPM debug output</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be set when invoking cpack in order to trace debug information
     during CPack RPM run. For example you may launch CPack like this
     cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_DESCRIPTION">
<title>CPACK_RPM_PACKAGE_DESCRIPTION</title>
<abstract>
<para>RPM package description</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_DESCRIPTION_FILE if set or "no package description available"
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_GROUP">
<title>CPACK_RPM_PACKAGE_GROUP</title>
<abstract>
<para>The RPM package group</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : "unknown"
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_LICENSE">
<title>CPACK_RPM_PACKAGE_LICENSE</title>
<abstract>
<para>The RPM package license policy</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : "unknown"
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_NAME">
<title>CPACK_RPM_PACKAGE_NAME</title>
<abstract>
<para>The RPM package name</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_NAME
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_OBSOLETES">
<title>CPACK_RPM_PACKAGE_OBSOLETES</title>
<abstract>
<para>RPM spec obsoletes field</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to set RPM packages that are obsoleted by this one.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_PROVIDES">
<title>CPACK_RPM_PACKAGE_PROVIDES</title>
<abstract>
<para>RPM spec provides field</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to set RPM dependencies (provides).
     The provided package list of an RPM file could be printed with
     rpm -qp --provides file.rpm
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_RELEASE">
<title>CPACK_RPM_PACKAGE_RELEASE</title>
<abstract>
<para>The RPM package release</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : 1
     This is the numbering of the RPM package
     itself, i.e. the version of the packaging and not the version of the
     content (see CPACK_RPM_PACKAGE_VERSION). One may change the default
     value if the previous packaging was buggy and/or you want to put here
     a fancy Linux distro specific numbering.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_RELOCATABLE">
<title>CPACK_RPM_PACKAGE_RELOCATABLE</title>
<abstract>
<para>build a relocatable RPM</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : CPACK_PACKAGE_RELOCATABLE
     If this variable is set to TRUE or ON CPackRPM will try
     to build a relocatable RPM package. A relocatable RPM may
     be installed using rpm --prefix or --relocate in order to
     install it at an alternate place see rpm(8).
     Note that currently this may fail if CPACK_SET_DESTDIR is set to ON.
     If CPACK_SET_DESTDIR is set then you will get a warning message
     but if there is file installed with absolute path you'll get
     unexpected behavior.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_REQUIRES">
<title>CPACK_RPM_PACKAGE_REQUIRES</title>
<abstract>
<para>RPM spec requires field</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to set RPM dependencies (requires).
     Note that you must enclose the complete requires string between quotes,
     for example:
     set(CPACK_RPM_PACKAGE_REQUIRES "python &gt;= 2.5.0, cmake &gt;= 2.8")
     The required package list of an RPM file could be printed with
     rpm -qp --requires file.rpm
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_SUGGESTS">
<title>CPACK_RPM_PACKAGE_SUGGESTS</title>
<abstract>
<para>RPM spec suggest field</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to set weak RPM dependencies (suggests).
     Note that you must enclose the complete requires string between quotes.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_SUMMARY">
<title>CPACK_RPM_PACKAGE_SUMMARY</title>
<abstract>
<para>The RPM package summary</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_DESCRIPTION_SUMMARY
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_URL">
<title>CPACK_RPM_PACKAGE_URL</title>
<abstract>
<para>The projects URL</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_VENDOR">
<title>CPACK_RPM_PACKAGE_VENDOR</title>
<abstract>
<para>The RPM package vendor</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_VENDOR if set or "unknown"
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PACKAGE_VERSION">
<title>CPACK_RPM_PACKAGE_VERSION</title>
<abstract>
<para>The RPM package version</para>
</abstract>
<para>
<programlisting>     Mandatory : YES
     Default   : CPACK_PACKAGE_VERSION
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_POST_INSTALL_SCRIPT_FILE">
<title>CPACK_RPM_POST_INSTALL_SCRIPT_FILE</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>  CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE
     Mandatory : NO
     Default   : -
     May be used to embed a post (un)installation script in the spec file.
     The refered script file(s) will be read and directly
     put after the %post or %postun section
     If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
     each component can be overridden with
     CPACK_RPM_&lt;COMPONENT&gt;_POST_INSTALL_SCRIPT_FILE and
     CPACK_RPM_&lt;COMPONENT&gt;_POST_UNINSTALL_SCRIPT_FILE
     One may verify which scriptlet has been included with
      rpm -qp --scripts  package.rpm
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_PRE_INSTALL_SCRIPT_FILE">
<title>CPACK_RPM_PRE_INSTALL_SCRIPT_FILE</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>  CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE
     Mandatory : NO
     Default   : -
     May be used to embed a pre (un)installation script in the spec file.
     The refered script file(s) will be read and directly
     put after the %pre or %preun section
     If CPACK_RPM_COMPONENT_INSTALL is set to ON the (un)install script for
     each component can be overridden with
     CPACK_RPM_&lt;COMPONENT&gt;_PRE_INSTALL_SCRIPT_FILE and
     CPACK_RPM_&lt;COMPONENT&gt;_PRE_UNINSTALL_SCRIPT_FILE
     One may verify which scriptlet has been included with
      rpm -qp --scripts  package.rpm
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_SPEC_INSTALL_POST">
<title>CPACK_RPM_SPEC_INSTALL_POST</title>
<abstract>
<para>[deprecated]</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     This way of specifying post-install script is deprecated use
     CPACK_RPM_POST_INSTALL_SCRIPT_FILE
     May be used to set an RPM post-install command inside the spec file.
     For example setting it to "/bin/true" may be used to prevent
     rpmbuild to strip binaries.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_SPEC_MORE_DEFINE">
<title>CPACK_RPM_SPEC_MORE_DEFINE</title>
<abstract>
<para>RPM extended spec definitions lines</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be used to add any %define lines to the generated spec file.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_USER_BINARY_SPECFILE">
<title>CPACK_RPM_USER_BINARY_SPECFILE</title>
<abstract>
<para>A user provided spec file</para>
</abstract>
<para>
<programlisting>     Mandatory : NO
     Default   : -
     May be set by the user in order to specify a USER binary spec file
     to be used by CPackRPM instead of generating the file.
     The specified file will be processed by configure_file( @ONLY).
     One can provide a component specific file by setting
     CPACK_RPM_&lt;componentName&gt;_USER_BINARY_SPECFILE.
</programlisting>
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_RPM_USER_FILELIST">
<title>CPACK_RPM_USER_FILELIST</title>
<abstract>
<para></para>
</abstract>
<para>
<programlisting>  CPACK_RPM_&lt;COMPONENT&gt;_USER_FILELIST
     Mandatory : NO
     Default   : -
     May be used to explicitly specify %(&lt;directive&gt;) file line
     in the spec file. Like %config(noreplace) or any other directive
     that be found in the %files section. Since CPackRPM is generating
     the list of files (and directories) the user specified files of
     the CPACK_RPM_&lt;COMPONENT&gt;_USER_FILELIST list will be removed from the generated list.
</programlisting>
</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_specific_to_CPack_WiX_generator">
<title>Variables specific to CPack WiX generator</title>
<sect2 id="cpack.variable.CPACK_WIX_CULTURES">
<title>CPACK_WIX_CULTURES</title>
<abstract>
<para>Language(s) of the installer</para>
</abstract>
<para>Languages are compiled into the WixUI extension library. To use them, simply provide the name of the culture.  If you specify more than one culture identifier in a comma or semicolon delimited list, the first one that is found will be used.  You can find a list of supported languages at: <ulink url="http://wix.sourceforge.net/manual-wix3/WixUI_localization.htm" />
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_LICENSE_RTF">
<title>CPACK_WIX_LICENSE_RTF</title>
<abstract>
<para>RTF License File</para>
</abstract>
<para>If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension it is used as-is.
</para>
<para>If CPACK_RESOURCE_FILE_LICENSE has an .txt extension it is implicitly converted to RTF by the WiX Generator.
</para>
<para>With CPACK_WIX_LICENSE_RTF you can override the license file used by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE is in an unsupported format or the .txt -&gt; .rtf conversion does not work as expected.
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_PRODUCT_GUID">
<title>CPACK_WIX_PRODUCT_GUID</title>
<abstract>
<para>Product GUID (Product/@Id)</para>
</abstract>
<para>Will be automatically generated unless explicitly provided.
</para>
<para>If explicitly provided this will set the Product Id of your installer.
</para>
<para>The installer will abort if it detects a pre-existing installation that uses the same GUID.
</para>
<para>The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID.</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_PRODUCT_ICON">
<title>CPACK_WIX_PRODUCT_ICON</title>
<abstract>
<para>The Icon shown next to the program name in Add/Remove programs</para>
</abstract>
<para>If set, this icon is used in place of the default icon.
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_PROGRAM_MENU_FOLDER">
<title>CPACK_WIX_PROGRAM_MENU_FOLDER</title>
<abstract>
<para>Start menu folder name for launcher</para>
</abstract>
<para>If this variable is not set, it will be initialized with CPACK_PACKAGE_NAME
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_TEMPLATE">
<title>CPACK_WIX_TEMPLATE</title>
<abstract>
<para>Template file for WiX generation</para>
</abstract>
<para>If this variable is set, the specified template will be used to generate the WiX wxs file. This should be used if further customization of the output is required.
</para>
<para>If this variable is not set, the default MSI template included with CMake will be used.
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_UI_BANNER">
<title>CPACK_WIX_UI_BANNER</title>
<abstract>
<para>The bitmap will appear at the top of all installer pages other than the welcome and completion dialogs</para>
</abstract>
<para>If set, this image will replace the default banner image.
</para>
<para>This image must be 493 by 58 pixels.
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_UI_DIALOG">
<title>CPACK_WIX_UI_DIALOG</title>
<abstract>
<para>Background bitmap used on the welcome and completion dialogs</para>
</abstract>
<para>If this variable is set, the installer will replace the default dialog image.
</para>
<para>This image must be 493 by 312 pixels.
</para>
</sect2>
<sect2 id="cpack.variable.CPACK_WIX_UPGRADE_GUID">
<title>CPACK_WIX_UPGRADE_GUID</title>
<abstract>
<para>Upgrade GUID (Product/@UpgradeCode)</para>
</abstract>
<para>Will be automatically generated unless explicitly provided.
</para>
<para>It should be explicitly set to a constant generated gloabally unique identifier (GUID) to allow your installers to replace existing installations that use the same GUID.
</para>
<para>You may for example explicitly set this variable in your CMakeLists.txt to the value that has been generated per default. You should not use GUIDs that you did not generate yourself or which may belong to other projects.
</para>
<para>A GUID shall have the following fixed length syntax: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
</para>
<para>
<programlisting>  (each X represents an uppercase hexadecimal digit)
</programlisting>
</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_that_Control_the_Build">
<title>Variables that Control the Build</title>
<sect2 id="cpack.variable.CMAKE__CONFIG__POSTFIX">
<title>CMAKE_&lt;CONFIG&gt;_POSTFIX</title>
<abstract>
<para>Default filename postfix for libraries under configuration &lt;CONFIG&gt;.</para>
</abstract>
<para>When a non-executable target is created its &lt;CONFIG&gt;_POSTFIX target property is initialized with the value of this variable if it is set.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE__LANG__VISIBILITY_PRESET">
<title>CMAKE_&lt;LANG&gt;_VISIBILITY_PRESET</title>
<abstract>
<para>Default value for &lt;LANG&gt;_VISIBILITY_PRESET of targets.</para>
</abstract>
<para>This variable is used to initialize the &lt;LANG&gt;_VISIBILITY_PRESET property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ARCHIVE_OUTPUT_DIRECTORY">
<title>CMAKE_ARCHIVE_OUTPUT_DIRECTORY</title>
<abstract>
<para>Where to put all the ARCHIVE targets when built.</para>
</abstract>
<para>This variable is used to initialize the ARCHIVE_OUTPUT_DIRECTORY property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_AUTOMOC">
<title>CMAKE_AUTOMOC</title>
<abstract>
<para>Whether to handle moc automatically for Qt targets.</para>
</abstract>
<para>This variable is used to initialize the AUTOMOC property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_AUTOMOC_MOC_OPTIONS">
<title>CMAKE_AUTOMOC_MOC_OPTIONS</title>
<abstract>
<para>Additional options for moc when using automoc (see CMAKE_AUTOMOC).</para>
</abstract>
<para>This variable is used to initialize the AUTOMOC_MOC_OPTIONS property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_BUILD_WITH_INSTALL_RPATH">
<title>CMAKE_BUILD_WITH_INSTALL_RPATH</title>
<abstract>
<para>Use the install path for the RPATH</para>
</abstract>
<para>Normally CMake uses the build tree for the RPATH when building executables etc on systems that use RPATH. When the software is installed the executables etc are relinked by CMake to have the install RPATH. If this variable is set to true then the software is always built with the install path for the RPATH and does not need to be relinked when installed.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_DEBUG_POSTFIX">
<title>CMAKE_DEBUG_POSTFIX</title>
<abstract>
<para>See variable CMAKE_&lt;CONFIG&gt;_POSTFIX.</para>
</abstract>
<para>This variable is a special case of the more-general CMAKE_&lt;CONFIG&gt;_POSTFIX variable for the DEBUG configuration.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_EXE_LINKER_FLAGS">
<title>CMAKE_EXE_LINKER_FLAGS</title>
<abstract>
<para>Linker flags to be used to create executables.</para>
</abstract>
<para>These flags will be used by the linker when creating an executable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_EXE_LINKER_FLAGS__CONFIG_">
<title>CMAKE_EXE_LINKER_FLAGS_&lt;CONFIG&gt;</title>
<abstract>
<para>Flags to be used when linking an executable.</para>
</abstract>
<para>Same as CMAKE_C_FLAGS_* but used by the linker when creating executables.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_Fortran_FORMAT">
<title>CMAKE_Fortran_FORMAT</title>
<abstract>
<para>Set to FIXED or FREE to indicate the Fortran source layout.</para>
</abstract>
<para>This variable is used to initialize the Fortran_FORMAT property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_Fortran_MODULE_DIRECTORY">
<title>CMAKE_Fortran_MODULE_DIRECTORY</title>
<abstract>
<para>Fortran module output directory.</para>
</abstract>
<para>This variable is used to initialize the Fortran_MODULE_DIRECTORY property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_GNUtoMS">
<title>CMAKE_GNUtoMS</title>
<abstract>
<para>Convert GNU import libraries (.dll.a) to MS format (.lib).</para>
</abstract>
<para>This variable is used to initialize the GNUtoMS property on targets when they are created.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INCLUDE_CURRENT_DIR">
<title>CMAKE_INCLUDE_CURRENT_DIR</title>
<abstract>
<para>Automatically add the current source- and build directories to the include path.</para>
</abstract>
<para>If this variable is enabled, CMake automatically adds in each directory ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to the include path for this directory. These additional include directories do not propagate down to subdirectories. This is useful mainly for out-of-source builds, where files generated into the build tree are included by files located in the source tree.
</para>
<para>By default CMAKE_INCLUDE_CURRENT_DIR is OFF.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE">
<title>CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE</title>
<abstract>
<para>Automatically add the current source- and build directories to the INTERFACE_INCLUDE_DIRECTORIES.</para>
</abstract>
<para>If this variable is enabled, CMake automatically adds for each shared library target, static library target, module target and executable target, ${CMAKE_CURRENT_SOURCE_DIR} and ${CMAKE_CURRENT_BINARY_DIR} to the INTERFACE_INCLUDE_DIRECTORIES.By default CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE is OFF.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INSTALL_NAME_DIR">
<title>CMAKE_INSTALL_NAME_DIR</title>
<abstract>
<para>Mac OS X directory name for installed targets.</para>
</abstract>
<para>CMAKE_INSTALL_NAME_DIR is used to initialize the INSTALL_NAME_DIR property on all targets. See that target property for more information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INSTALL_RPATH">
<title>CMAKE_INSTALL_RPATH</title>
<abstract>
<para>The rpath to use for installed targets.</para>
</abstract>
<para>A semicolon-separated list specifying the rpath to use in installed targets (for platforms that support it).  This is used to initialize the target property INSTALL_RPATH for all targets.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_INSTALL_RPATH_USE_LINK_PATH">
<title>CMAKE_INSTALL_RPATH_USE_LINK_PATH</title>
<abstract>
<para>Add paths to linker search and installed rpath.</para>
</abstract>
<para>CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true will append directories in the linker search path and outside the project to the INSTALL_RPATH.  This is used to initialize the target property INSTALL_RPATH_USE_LINK_PATH for all targets.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LIBRARY_OUTPUT_DIRECTORY">
<title>CMAKE_LIBRARY_OUTPUT_DIRECTORY</title>
<abstract>
<para>Where to put all the LIBRARY targets when built.</para>
</abstract>
<para>This variable is used to initialize the LIBRARY_OUTPUT_DIRECTORY property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LIBRARY_PATH_FLAG">
<title>CMAKE_LIBRARY_PATH_FLAG</title>
<abstract>
<para>The flag to be used to add a library search path to a compiler.</para>
</abstract>
<para>The flag will be used to specify a library directory to the compiler.  On most compilers this is "-L".</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LINK_DEF_FILE_FLAG__">
<title>CMAKE_LINK_DEF_FILE_FLAG  </title>
<abstract>
<para>Linker flag to be used to specify a .def file for dll creation.</para>
</abstract>
<para>The flag will be used to add a .def file when creating a dll on Windows; this is only defined on Windows.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LINK_DEPENDS_NO_SHARED">
<title>CMAKE_LINK_DEPENDS_NO_SHARED</title>
<abstract>
<para>Whether to skip link dependencies on shared library files.</para>
</abstract>
<para>This variable initializes the LINK_DEPENDS_NO_SHARED property on targets when they are created.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LINK_INTERFACE_LIBRARIES">
<title>CMAKE_LINK_INTERFACE_LIBRARIES</title>
<abstract>
<para>Default value for LINK_INTERFACE_LIBRARIES of targets.</para>
</abstract>
<para>This variable is used to initialize the LINK_INTERFACE_LIBRARIES property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LINK_LIBRARY_FILE_FLAG">
<title>CMAKE_LINK_LIBRARY_FILE_FLAG</title>
<abstract>
<para>Flag to be used to link a library specified by a path to its file.</para>
</abstract>
<para>The flag will be used before a library file path is given to the linker.  This is needed only on very few platforms.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LINK_LIBRARY_FLAG">
<title>CMAKE_LINK_LIBRARY_FLAG</title>
<abstract>
<para>Flag to be used to link a library into an executable.</para>
</abstract>
<para>The flag will be used to specify a library to link to an executable.  On most compilers this is "-l".</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MACOSX_BUNDLE">
<title>CMAKE_MACOSX_BUNDLE</title>
<abstract>
<para>Default value for MACOSX_BUNDLE of targets.</para>
</abstract>
<para>This variable is used to initialize the MACOSX_BUNDLE property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MODULE_LINKER_FLAGS">
<title>CMAKE_MODULE_LINKER_FLAGS</title>
<abstract>
<para>Linker flags to be used to create modules.</para>
</abstract>
<para>These flags will be used by the linker when creating a module.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MODULE_LINKER_FLAGS__CONFIG_">
<title>CMAKE_MODULE_LINKER_FLAGS_&lt;CONFIG&gt;</title>
<abstract>
<para>Flags to be used when linking a module.</para>
</abstract>
<para>Same as CMAKE_C_FLAGS_* but used by the linker when creating modules.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_NO_BUILTIN_CHRPATH">
<title>CMAKE_NO_BUILTIN_CHRPATH</title>
<abstract>
<para>Do not use the builtin ELF editor to fix RPATHs on installation.</para>
</abstract>
<para>When an ELF binary needs to have a different RPATH after installation than it does in the build tree, CMake uses a builtin editor to change the RPATH in the installed copy.  If this variable is set to true then CMake will relink the binary before installation instead of using its builtin editor.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_PDB_OUTPUT_DIRECTORY">
<title>CMAKE_PDB_OUTPUT_DIRECTORY</title>
<abstract>
<para>Where to put all the MS debug symbol files from linker.</para>
</abstract>
<para>This variable is used to initialize the PDB_OUTPUT_DIRECTORY property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_POSITION_INDEPENDENT_CODE">
<title>CMAKE_POSITION_INDEPENDENT_CODE</title>
<abstract>
<para>Default value for POSITION_INDEPENDENT_CODE of targets.</para>
</abstract>
<para>This variable is used to initialize the POSITION_INDEPENDENT_CODE property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_RUNTIME_OUTPUT_DIRECTORY">
<title>CMAKE_RUNTIME_OUTPUT_DIRECTORY</title>
<abstract>
<para>Where to put all the RUNTIME targets when built.</para>
</abstract>
<para>This variable is used to initialize the RUNTIME_OUTPUT_DIRECTORY property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SHARED_LINKER_FLAGS">
<title>CMAKE_SHARED_LINKER_FLAGS</title>
<abstract>
<para>Linker flags to be used to create shared libraries.</para>
</abstract>
<para>These flags will be used by the linker when creating a shared library.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SHARED_LINKER_FLAGS__CONFIG_">
<title>CMAKE_SHARED_LINKER_FLAGS_&lt;CONFIG&gt;</title>
<abstract>
<para>Flags to be used when linking a shared library.</para>
</abstract>
<para>Same as CMAKE_C_FLAGS_* but used by the linker when creating shared libraries.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SKIP_BUILD_RPATH">
<title>CMAKE_SKIP_BUILD_RPATH</title>
<abstract>
<para>Do not include RPATHs in the build tree.</para>
</abstract>
<para>Normally CMake uses the build tree for the RPATH when building executables etc on systems that use RPATH. When the software is installed the executables etc are relinked by CMake to have the install RPATH. If this variable is set to true then the software is always built with no RPATH.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SKIP_INSTALL_RPATH">
<title>CMAKE_SKIP_INSTALL_RPATH</title>
<abstract>
<para>Do not include RPATHs in the install tree.</para>
</abstract>
<para>Normally CMake uses the build tree for the RPATH when building executables etc on systems that use RPATH. When the software is installed the executables etc are relinked by CMake to have the install RPATH. If this variable is set to true then the software is always installed without RPATH, even if RPATH is enabled when building.  This can be useful for example to allow running tests from the build directory with RPATH enabled before the installation step.  To omit RPATH in both the build and install steps, use CMAKE_SKIP_RPATH instead.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_STATIC_LINKER_FLAGS">
<title>CMAKE_STATIC_LINKER_FLAGS</title>
<abstract>
<para>Linker flags to be used to create static libraries.</para>
</abstract>
<para>These flags will be used by the linker when creating a static library.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_STATIC_LINKER_FLAGS__CONFIG_">
<title>CMAKE_STATIC_LINKER_FLAGS_&lt;CONFIG&gt;</title>
<abstract>
<para>Flags to be used when linking a static library.</para>
</abstract>
<para>Same as CMAKE_C_FLAGS_* but used by the linker when creating static libraries.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_TRY_COMPILE_CONFIGURATION">
<title>CMAKE_TRY_COMPILE_CONFIGURATION</title>
<abstract>
<para>Build configuration used for try_compile and try_run projects.</para>
</abstract>
<para>Projects built by try_compile and try_run are built synchronously during the CMake configuration step.  Therefore a specific build configuration must be chosen even if the generated build system supports multiple configurations.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_USE_RELATIVE_PATHS">
<title>CMAKE_USE_RELATIVE_PATHS</title>
<abstract>
<para>Use relative paths (May not work!).</para>
</abstract>
<para>If this is set to TRUE, then CMake will use relative paths between the source and binary tree.  This option does not work for more complicated projects, and relative paths are used when possible.  In general, it is not possible to move CMake generated makefiles to a different location regardless of the value of this variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_VISIBILITY_INLINES_HIDDEN">
<title>CMAKE_VISIBILITY_INLINES_HIDDEN</title>
<abstract>
<para>Default value for VISIBILITY_INLINES_HIDDEN of targets.</para>
</abstract>
<para>This variable is used to initialize the VISIBILITY_INLINES_HIDDEN property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_WIN32_EXECUTABLE">
<title>CMAKE_WIN32_EXECUTABLE</title>
<abstract>
<para>Default value for WIN32_EXECUTABLE of targets.</para>
</abstract>
<para>This variable is used to initialize the WIN32_EXECUTABLE property on all the targets.  See that target property for additional information.</para>
</sect2>
<sect2 id="cpack.variable.EXECUTABLE_OUTPUT_PATH">
<title>EXECUTABLE_OUTPUT_PATH</title>
<abstract>
<para>Old executable location variable.</para>
</abstract>
<para>The target property RUNTIME_OUTPUT_DIRECTORY supercedes this variable for a target if it is set.  Executable targets are otherwise placed in this directory.</para>
</sect2>
<sect2 id="cpack.variable.LIBRARY_OUTPUT_PATH">
<title>LIBRARY_OUTPUT_PATH</title>
<abstract>
<para>Old library location variable.</para>
</abstract>
<para>The target properties ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY supercede this variable for a target if they are set.  Library targets are otherwise placed in this directory.</para>
</sect2>
</sect1>
<sect1 id="cpack.Variables_that_Provide_Information">
<title>Variables that Provide Information</title>
<sect2 id="cpack.variable.CMAKE_AR">
<title>CMAKE_AR</title>
<abstract>
<para>Name of archiving tool for static libraries.</para>
</abstract>
<para>This specifies the name of the program that creates archive or static libraries.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ARGC">
<title>CMAKE_ARGC</title>
<abstract>
<para>Number of command line arguments passed to CMake in script mode.</para>
</abstract>
<para>When run in -P script mode, CMake sets this variable to the number of command line arguments. See also CMAKE_ARGV0, 1, 2 ...</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ARGV0">
<title>CMAKE_ARGV0</title>
<abstract>
<para>Command line argument passed to CMake in script mode.</para>
</abstract>
<para>When run in -P script mode, CMake sets this variable to the first command line argument. It then also sets CMAKE_ARGV1, CMAKE_ARGV2, ... and so on, up to the number of command line arguments given. See also CMAKE_ARGC.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_BINARY_DIR">
<title>CMAKE_BINARY_DIR</title>
<abstract>
<para>The path to the top level of the build tree.</para>
</abstract>
<para>This is the full path to the top level of the current CMake build tree. For an in-source build, this would be the same as CMAKE_SOURCE_DIR.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_BUILD_TOOL">
<title>CMAKE_BUILD_TOOL</title>
<abstract>
<para>Tool used for the actual build process.</para>
</abstract>
<para>This variable is set to the program that will be needed to build the output of CMake.   If the generator selected was Visual Studio 6, the CMAKE_BUILD_TOOL will be set to msdev, for Unix Makefiles it will be set to make or gmake, and for Visual Studio 7 it set to devenv.  For NMake Makefiles the value is nmake. This can be useful for adding special flags and commands based on the final build environment.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CACHEFILE_DIR">
<title>CMAKE_CACHEFILE_DIR</title>
<abstract>
<para>The directory with the CMakeCache.txt file.</para>
</abstract>
<para>This is the full path to the directory that has the CMakeCache.txt file in it.  This is the same as CMAKE_BINARY_DIR.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CACHE_MAJOR_VERSION">
<title>CMAKE_CACHE_MAJOR_VERSION</title>
<abstract>
<para>Major version of CMake used to create the CMakeCache.txt file</para>
</abstract>
<para>This stores the major version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CACHE_MINOR_VERSION">
<title>CMAKE_CACHE_MINOR_VERSION</title>
<abstract>
<para>Minor version of CMake used to create the CMakeCache.txt file</para>
</abstract>
<para>This stores the minor version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CACHE_PATCH_VERSION">
<title>CMAKE_CACHE_PATCH_VERSION</title>
<abstract>
<para>Patch version of CMake used to create the CMakeCache.txt file</para>
</abstract>
<para>This stores the patch version of CMake used to write a CMake cache file. It is only different when a different version of CMake is run on a previously created cache file.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CFG_INTDIR">
<title>CMAKE_CFG_INTDIR</title>
<abstract>
<para>Build-time reference to per-configuration output subdirectory.</para>
</abstract>
<para>For native build systems supporting multiple configurations in the build tree (such as Visual Studio and Xcode), the value is a reference to a build-time variable specifying the name of the per-configuration output subdirectory.  On Makefile generators this evaluates to "." because there is only one configuration in a build tree.  Example values:
</para>
<para>
<programlisting>  $(IntDir)        = Visual Studio 6
  $(OutDir)        = Visual Studio 7, 8, 9
  $(Configuration) = Visual Studio 10
  $(CONFIGURATION) = Xcode
  .                = Make-based tools
</programlisting>
</para>
<para>Since these values are evaluated by the native build system, this variable is suitable only for use in command lines that will be evaluated at build time.  Example of intended usage:
</para>
<para>
<programlisting>  add_executable(mytool mytool.c)
  add_custom_command(
    OUTPUT out.txt
    COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool
            ${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt
    DEPENDS mytool in.txt
    )
  add_custom_target(drive ALL DEPENDS out.txt)
</programlisting>
</para>
<para>Note that CMAKE_CFG_INTDIR is no longer necessary for this purpose but has been left for compatibility with existing projects.  Instead add_custom_command() recognizes executable target names in its COMMAND option, so "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool" can be replaced by just "mytool".
</para>
<para>This variable is read-only.  Setting it is undefined behavior.  In multi-configuration build systems the value of this variable is passed as the value of preprocessor symbol "CMAKE_INTDIR" to the compilation of all source files.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_COMMAND">
<title>CMAKE_COMMAND</title>
<abstract>
<para>The full path to the cmake executable.</para>
</abstract>
<para>This is the full path to the CMake executable cmake which is useful from custom commands that want to use the cmake -E option for portable system commands.  (e.g. /usr/local/bin/cmake</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CROSSCOMPILING">
<title>CMAKE_CROSSCOMPILING</title>
<abstract>
<para>Is CMake currently cross compiling.</para>
</abstract>
<para>This variable will be set to true by CMake if CMake is cross compiling. Specifically if the build platform is different from the target platform.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CTEST_COMMAND">
<title>CMAKE_CTEST_COMMAND</title>
<abstract>
<para>Full path to ctest command installed with cmake.</para>
</abstract>
<para>This is the full path to the CTest executable ctest which is useful from custom commands that want to use the cmake -E option for portable system commands.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CURRENT_BINARY_DIR">
<title>CMAKE_CURRENT_BINARY_DIR</title>
<abstract>
<para>The path to the binary directory currently being processed.</para>
</abstract>
<para>This the full path to the build directory that is currently being processed by cmake.  Each directory added by add_subdirectory will create a binary directory in the build tree, and as it is being processed this variable will be set.  For in-source builds this is the current source directory being processed.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CURRENT_LIST_DIR">
<title>CMAKE_CURRENT_LIST_DIR</title>
<abstract>
<para>Full directory of the listfile currently being processed.</para>
</abstract>
<para>As CMake processes the listfiles in your project this variable will always be set to the directory where the listfile which is currently being processed (CMAKE_CURRENT_LIST_FILE) is located.  The value has dynamic scope.  When CMake starts processing commands in a source file it sets this variable to the directory where this file is located.  When CMake finishes processing commands from the file it restores the previous value.  Therefore the value of the variable inside a macro or function is the directory of the file invoking the bottom-most entry on the call stack, not the directory of the file containing the macro or function definition.
</para>
<para>See also CMAKE_CURRENT_LIST_FILE.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CURRENT_LIST_FILE">
<title>CMAKE_CURRENT_LIST_FILE</title>
<abstract>
<para>Full path to the listfile currently being processed.</para>
</abstract>
<para>As CMake processes the listfiles in your project this variable will always be set to the one currently being processed.  The value has dynamic scope.  When CMake starts processing commands in a source file it sets this variable to the location of the file.  When CMake finishes processing commands from the file it restores the previous value.  Therefore the value of the variable inside a macro or function is the file invoking the bottom-most entry on the call stack, not the file containing the macro or function definition.
</para>
<para>See also CMAKE_PARENT_LIST_FILE.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CURRENT_LIST_LINE">
<title>CMAKE_CURRENT_LIST_LINE</title>
<abstract>
<para>The line number of the current file being processed.</para>
</abstract>
<para>This is the line number of the file currently being processed by cmake.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_CURRENT_SOURCE_DIR">
<title>CMAKE_CURRENT_SOURCE_DIR</title>
<abstract>
<para>The path to the source directory currently being processed.</para>
</abstract>
<para>This the full path to the source directory that is currently being processed by cmake.  </para>
</sect2>
<sect2 id="cpack.variable.CMAKE_DL_LIBS">
<title>CMAKE_DL_LIBS</title>
<abstract>
<para>Name of library containing dlopen and dlcose.</para>
</abstract>
<para>The name of the library that has dlopen and dlclose in it, usually -ldl on most UNIX machines.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_EDIT_COMMAND">
<title>CMAKE_EDIT_COMMAND</title>
<abstract>
<para>Full path to cmake-gui or ccmake.</para>
</abstract>
<para>This is the full path to the CMake executable that can graphically edit the cache.  For example, cmake-gui, ccmake, or cmake -i.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_EXECUTABLE_SUFFIX">
<title>CMAKE_EXECUTABLE_SUFFIX</title>
<abstract>
<para>The suffix for executables on this platform.</para>
</abstract>
<para>The suffix to use for the end of an executable filename if any, .exe on Windows.
</para>
<para>CMAKE_EXECUTABLE_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_EXTRA_GENERATOR">
<title>CMAKE_EXTRA_GENERATOR</title>
<abstract>
<para>The extra generator used to build the project.</para>
</abstract>
<para>When using the Eclipse, CodeBlocks or KDevelop generators, CMake generates Makefiles (CMAKE_GENERATOR) and additionally project files for the respective IDE. This IDE project file generator is stored in CMAKE_EXTRA_GENERATOR (e.g. "Eclipse CDT4").</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES">
<title>CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES</title>
<abstract>
<para>Additional suffixes for shared libraries.</para>
</abstract>
<para>Extensions for shared libraries other than that specified by CMAKE_SHARED_LIBRARY_SUFFIX, if any.  CMake uses this to recognize external shared library files during analysis of libraries linked by a target.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_GENERATOR">
<title>CMAKE_GENERATOR</title>
<abstract>
<para>The generator used to build the project.</para>
</abstract>
<para>The name of the generator that is being used to generate the build files.  (e.g. "Unix Makefiles", "Visual Studio 6", etc.)</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_GENERATOR_TOOLSET">
<title>CMAKE_GENERATOR_TOOLSET</title>
<abstract>
<para>Native build system toolset name specified by user.</para>
</abstract>
<para>Some CMake generators support a toolset name to be given to the native build system to choose a compiler.  If the user specifies a toolset name (e.g. via the cmake -T option) the value will be available in this variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_HOME_DIRECTORY">
<title>CMAKE_HOME_DIRECTORY</title>
<abstract>
<para>Path to top of source tree.</para>
</abstract>
<para>This is the path to the top level of the source tree.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_IMPORT_LIBRARY_PREFIX">
<title>CMAKE_IMPORT_LIBRARY_PREFIX</title>
<abstract>
<para>The prefix for import libraries that you link to.</para>
</abstract>
<para>The prefix to use for the name of an import library if used on this platform.
</para>
<para>CMAKE_IMPORT_LIBRARY_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_IMPORT_LIBRARY_SUFFIX">
<title>CMAKE_IMPORT_LIBRARY_SUFFIX</title>
<abstract>
<para>The suffix for import libraries that you link to.</para>
</abstract>
<para>The suffix to use for the end of an import library filename if used on this platform.
</para>
<para>CMAKE_IMPORT_LIBRARY_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_LINK_LIBRARY_SUFFIX">
<title>CMAKE_LINK_LIBRARY_SUFFIX</title>
<abstract>
<para>The suffix for libraries that you link to.</para>
</abstract>
<para>The suffix to use for the end of a library filename, .lib on Windows.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MAJOR_VERSION">
<title>CMAKE_MAJOR_VERSION</title>
<abstract>
<para>The Major version of cmake (i.e. the 2 in 2.X.X)</para>
</abstract>
<para>This specifies the major version of the CMake executable being run.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MAKE_PROGRAM">
<title>CMAKE_MAKE_PROGRAM</title>
<abstract>
<para>See CMAKE_BUILD_TOOL.</para>
</abstract>
<para>This variable is around for backwards compatibility, see CMAKE_BUILD_TOOL.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MINIMUM_REQUIRED_VERSION">
<title>CMAKE_MINIMUM_REQUIRED_VERSION</title>
<abstract>
<para>Version specified to cmake_minimum_required command</para>
</abstract>
<para>Variable containing the VERSION component specified in the cmake_minimum_required command.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_MINOR_VERSION">
<title>CMAKE_MINOR_VERSION</title>
<abstract>
<para>The Minor version of cmake (i.e. the 4 in X.4.X).</para>
</abstract>
<para>This specifies the minor version of the CMake executable being run.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_PARENT_LIST_FILE">
<title>CMAKE_PARENT_LIST_FILE</title>
<abstract>
<para>Full path to the CMake file that included the current one.</para>
</abstract>
<para>While processing a CMake file loaded by include() or find_package() this variable contains the full path to the file including it.  The top of the include stack is always the CMakeLists.txt for the current directory.  See also CMAKE_CURRENT_LIST_FILE.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_PATCH_VERSION">
<title>CMAKE_PATCH_VERSION</title>
<abstract>
<para>The patch version of cmake (i.e. the 3 in X.X.3).</para>
</abstract>
<para>This specifies the patch version of the CMake executable being run.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_PROJECT_NAME">
<title>CMAKE_PROJECT_NAME</title>
<abstract>
<para>The name of the current project.</para>
</abstract>
<para>This specifies name of the current project from the closest inherited PROJECT command.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_RANLIB">
<title>CMAKE_RANLIB</title>
<abstract>
<para>Name of randomizing tool for static libraries.</para>
</abstract>
<para>This specifies name of the program that randomizes libraries on UNIX, not used on Windows, but may be present.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_ROOT">
<title>CMAKE_ROOT</title>
<abstract>
<para>Install directory for running cmake.</para>
</abstract>
<para>This is the install root for the running CMake and the Modules directory can be found here. This is commonly used in this format: ${CMAKE_ROOT}/Modules</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SCRIPT_MODE_FILE">
<title>CMAKE_SCRIPT_MODE_FILE</title>
<abstract>
<para>Full path to the -P script file currently being processed.</para>
</abstract>
<para>When run in -P script mode, CMake sets this variable to the full path of the script file. When run to configure a CMakeLists.txt file, this variable is not set.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SHARED_LIBRARY_PREFIX">
<title>CMAKE_SHARED_LIBRARY_PREFIX</title>
<abstract>
<para>The prefix for shared libraries that you link to.</para>
</abstract>
<para>The prefix to use for the name of a shared library, lib on UNIX.
</para>
<para>CMAKE_SHARED_LIBRARY_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SHARED_LIBRARY_SUFFIX">
<title>CMAKE_SHARED_LIBRARY_SUFFIX</title>
<abstract>
<para>The suffix for shared libraries that you link to.</para>
</abstract>
<para>The suffix to use for the end of a shared library filename, .dll on Windows.
</para>
<para>CMAKE_SHARED_LIBRARY_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SHARED_MODULE_PREFIX">
<title>CMAKE_SHARED_MODULE_PREFIX</title>
<abstract>
<para>The prefix for loadable modules that you link to.</para>
</abstract>
<para>The prefix to use for the name of a loadable module on this platform.
</para>
<para>CMAKE_SHARED_MODULE_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SHARED_MODULE_SUFFIX">
<title>CMAKE_SHARED_MODULE_SUFFIX</title>
<abstract>
<para>The suffix for shared libraries that you link to.</para>
</abstract>
<para>The suffix to use for the end of a loadable module filename on this platform
</para>
<para>CMAKE_SHARED_MODULE_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SIZEOF_VOID_P">
<title>CMAKE_SIZEOF_VOID_P</title>
<abstract>
<para>Size of a void pointer.</para>
</abstract>
<para>This is set to the size of a pointer on the machine, and is determined by a try compile. If a 64 bit size is found, then the library search path is modified to look for 64 bit libraries first.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SKIP_RPATH">
<title>CMAKE_SKIP_RPATH</title>
<abstract>
<para>If true, do not add run time path information.</para>
</abstract>
<para>If this is set to TRUE, then the rpath information is not added to compiled executables.  The default is to add rpath information if the platform supports it.  This allows for easy running from the build tree.  To omit RPATH in the install step, but not the build step, use CMAKE_SKIP_INSTALL_RPATH instead.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_SOURCE_DIR">
<title>CMAKE_SOURCE_DIR</title>
<abstract>
<para>The path to the top level of the source tree.</para>
</abstract>
<para>This is the full path to the top level of the current CMake source tree. For an in-source build, this would be the same as CMAKE_BINARY_DIR.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_STANDARD_LIBRARIES">
<title>CMAKE_STANDARD_LIBRARIES</title>
<abstract>
<para>Libraries linked into every executable and shared library.</para>
</abstract>
<para>This is the list of libraries that are linked into all executables and libraries.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_STATIC_LIBRARY_PREFIX">
<title>CMAKE_STATIC_LIBRARY_PREFIX</title>
<abstract>
<para>The prefix for static libraries that you link to.</para>
</abstract>
<para>The prefix to use for the name of a static library, lib on UNIX.
</para>
<para>CMAKE_STATIC_LIBRARY_PREFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_STATIC_LIBRARY_SUFFIX">
<title>CMAKE_STATIC_LIBRARY_SUFFIX</title>
<abstract>
<para>The suffix for static libraries that you link to.</para>
</abstract>
<para>The suffix to use for the end of a static library filename, .lib on Windows.
</para>
<para>CMAKE_STATIC_LIBRARY_SUFFIX_&lt;LANG&gt; overrides this for language &lt;LANG&gt;.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_TWEAK_VERSION">
<title>CMAKE_TWEAK_VERSION</title>
<abstract>
<para>The tweak version of cmake (i.e. the 1 in X.X.X.1).</para>
</abstract>
<para>This specifies the tweak version of the CMake executable being run.  Releases use tweak &lt; 20000000 and development versions use the date format CCYYMMDD for the tweak level.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_VERBOSE_MAKEFILE">
<title>CMAKE_VERBOSE_MAKEFILE</title>
<abstract>
<para>Create verbose makefiles if on.</para>
</abstract>
<para>This variable defaults to false. You can set this variable to true to make CMake produce verbose makefiles that show each command line as it is used.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_VERSION">
<title>CMAKE_VERSION</title>
<abstract>
<para>The full version of cmake in major.minor.patch[.tweak[-id]] format.</para>
</abstract>
<para>This specifies the full version of the CMake executable being run.  This variable is defined by versions 2.6.3 and higher.  See variables CMAKE_MAJOR_VERSION, CMAKE_MINOR_VERSION, CMAKE_PATCH_VERSION, and CMAKE_TWEAK_VERSION for individual version components.  The [-id] component appears in non-release versions and may be arbitrary text.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_VS_PLATFORM_TOOLSET">
<title>CMAKE_VS_PLATFORM_TOOLSET</title>
<abstract>
<para>Visual Studio Platform Toolset name.</para>
</abstract>
<para>VS 10 and above use MSBuild under the hood and support multiple compiler toolchains.  CMake may specify a toolset explicitly, such as "v110" for VS 11 or "Windows7.1SDK" for 64-bit support in VS 10 Express.  CMake provides the name of the chosen toolset in this variable.</para>
</sect2>
<sect2 id="cpack.variable.CMAKE_XCODE_PLATFORM_TOOLSET">
<title>CMAKE_XCODE_PLATFORM_TOOLSET</title>
<abstract>
<para>Xcode compiler selection.</para>
</abstract>
<para>Xcode supports selection of a compiler from one of the installed toolsets.  CMake provides the name of the chosen toolset in this variable, if any is explicitly selected (e.g. via the cmake -T option).</para>
</sect2>
<sect2 id="cpack.variable.PROJECT_BINARY_DIR">
<title>PROJECT_BINARY_DIR</title>
<abstract>
<para>Full path to build directory for project.</para>
</abstract>
<para>This is the binary directory of the most recent PROJECT command.</para>
</sect2>
<sect2 id="cpack.variable.PROJECT_NAME">
<title>PROJECT_NAME</title>
<abstract>
<para>Name of the project given to the project command.</para>
</abstract>
<para>This is the name given to the most recent PROJECT command.</para>
</sect2>
<sect2 id="cpack.variable.PROJECT_SOURCE_DIR">
<title>PROJECT_SOURCE_DIR</title>
<abstract>
<para>Top level source directory for the current project.</para>
</abstract>
<para>This is the source directory of the most recent PROJECT command.</para>
</sect2>
<sect2 id="cpack.variable._Project_name__BINARY_DIR">
<title>[Project name]_BINARY_DIR</title>
<abstract>
<para>Top level binary directory for the named project.</para>
</abstract>
<para>A variable is created with the name used in the PROJECT command, and is the binary directory for the project.   This can be useful when SUBDIR is used to connect several projects.</para>
</sect2>
<sect2 id="cpack.variable._Project_name__SOURCE_DIR">
<title>[Project name]_SOURCE_DIR</title>
<abstract>
<para>Top level source directory for the named project.</para>
</abstract>
<para>A variable is created with the name used in the PROJECT command, and is the source directory for the project.   This can be useful when add_subdirectory is used to connect several projects.</para>
</sect2>
</sect1>
<sect1 id="cpack.Copyright">
<title>Copyright</title>
<para>Copyright 2000-2012 Kitware, Inc., Insight Software Consortium.  All rights reserved.</para>
<para>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</para>
<para>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</para>
<para>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</para>
<para>Neither the names of Kitware, Inc., the Insight Software Consortium, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission.</para>
<para>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</para>
</sect1>
<sect1 id="cpack.See_Also">
<title>See Also</title>
<abstract>
<para>The following resources are available to get help using CMake:</para>
</abstract>
<sect2 id="cpack.see.Home_Page">
<title>Home Page</title>
<abstract>
<para><ulink url="http://www.cmake.org" /></para>
</abstract>
<para>The primary starting point for learning about CMake.</para>
</sect2>
<sect2 id="cpack.see.Frequently_Asked_Questions">
<title>Frequently Asked Questions</title>
<abstract>
<para><ulink url="http://www.cmake.org/Wiki/CMake_FAQ" /></para>
</abstract>
<para>A Wiki is provided containing answers to frequently asked questions. </para>
</sect2>
<sect2 id="cpack.see.Online_Documentation">
<title>Online Documentation</title>
<abstract>
<para><ulink url="http://www.cmake.org/HTML/Documentation.html" /></para>
</abstract>
<para>Links to available documentation may be found on this web page.</para>
</sect2>
<sect2 id="cpack.see.Mailing_List">
<title>Mailing List</title>
<abstract>
<para><ulink url="http://www.cmake.org/HTML/MailingLists.html" /></para>
</abstract>
<para>For help and discussion about using cmake, a mailing list is provided at cmake@cmake.org. The list is member-post-only but one may sign up on the CMake web page. Please first read the full documentation at <ulink url="http://www.cmake.org" /> before posting questions to the list.</para>
</sect2>
</sect1>
</article>
