CPackComponent.cmake 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. CPackComponent
  5. --------------
  6. Configure components for binary installers and source packages.
  7. .. only:: html
  8. .. contents::
  9. Introduction
  10. ^^^^^^^^^^^^
  11. This module is automatically included by :module:`CPack`.
  12. Certain binary installers (especially the graphical installers) generated
  13. by CPack allow users to select individual application *components* to install.
  14. This module allows developers to configure the packaging of such components.
  15. Contents is assigned to components by the ``COMPONENT``
  16. argument of CMake's :command:`install` command. Components can be
  17. annotated with user-friendly names and descriptions, inter-component
  18. dependencies, etc., and grouped in various ways to customize the
  19. resulting installer, using the commands described below.
  20. To specify different groupings for different CPack generators use
  21. a CPACK_PROJECT_CONFIG_FILE.
  22. Variables
  23. ^^^^^^^^^
  24. The following variables influence the component-specific packaging:
  25. .. variable:: CPACK_COMPONENTS_ALL
  26. The list of component to install.
  27. The default value of this variable is computed by CPack and contains all
  28. components defined by the project. The user may set it to only include the
  29. specified components.
  30. Instead of specifying all the desired components, it is possible to obtain a
  31. list of all defined components and then remove the unwanted ones from the
  32. list. The :command:`get_cmake_property` command can be used to obtain the
  33. ``COMPONENTS`` property, then the :command:`list(REMOVE_ITEM)` command can be
  34. used to remove the unwanted ones. For example, to use all defined components
  35. except ``foo`` and ``bar``::
  36. get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
  37. list(REMOVE_ITEM CPACK_COMPONENTS_ALL "foo" "bar")
  38. .. variable:: CPACK_<GENNAME>_COMPONENT_INSTALL
  39. Enable/Disable component install for CPack generator <GENNAME>.
  40. Each CPack Generator (RPM, DEB, ARCHIVE, NSIS, DMG, etc...) has a legacy
  41. default behavior. e.g. RPM builds monolithic whereas NSIS builds
  42. component. One can change the default behavior by setting this variable to
  43. 0/1 or OFF/ON.
  44. .. variable:: CPACK_COMPONENTS_GROUPING
  45. Specify how components are grouped for multi-package component-aware CPack
  46. generators.
  47. Some generators like RPM or ARCHIVE (TGZ, ZIP, ...) may generate
  48. several packages files when there are components, depending
  49. on the value of this variable:
  50. * ONE_PER_GROUP (default): create one package per component group
  51. * IGNORE : create one package per component (ignore the groups)
  52. * ALL_COMPONENTS_IN_ONE : create a single package with all requested
  53. components
  54. .. variable:: CPACK_COMPONENT_<compName>_DISPLAY_NAME
  55. The name to be displayed for a component.
  56. .. variable:: CPACK_COMPONENT_<compName>_DESCRIPTION
  57. The description of a component.
  58. .. variable:: CPACK_COMPONENT_<compName>_GROUP
  59. The group of a component.
  60. .. variable:: CPACK_COMPONENT_<compName>_DEPENDS
  61. The dependencies (list of components) on which this component depends.
  62. .. variable:: CPACK_COMPONENT_<compName>_HIDDEN
  63. True if this component is hidden from the user.
  64. .. variable:: CPACK_COMPONENT_<compName>_REQUIRED
  65. True if this component is required.
  66. .. variable:: CPACK_COMPONENT_<compName>_DISABLED
  67. True if this component is not selected to be installed by default.
  68. Commands
  69. ^^^^^^^^
  70. Add component
  71. """""""""""""
  72. .. command:: cpack_add_component
  73. Describe an installation component.
  74. ::
  75. cpack_add_component(compname
  76. [DISPLAY_NAME name]
  77. [DESCRIPTION description]
  78. [HIDDEN | REQUIRED | DISABLED ]
  79. [GROUP group]
  80. [DEPENDS comp1 comp2 ... ]
  81. [INSTALL_TYPES type1 type2 ... ]
  82. [DOWNLOADED]
  83. [ARCHIVE_FILE filename]
  84. [PLIST filename])
  85. ``compname`` is the name of an installation component, as defined by the
  86. ``COMPONENT`` argument of one or more CMake :command:`install` commands.
  87. With the ``cpack_add_component`` command one can set a name, a description,
  88. and other attributes of an installation component.
  89. One can also assign a component to a component group.
  90. DISPLAY_NAME is the displayed name of the component, used in graphical
  91. installers to display the component name. This value can be any
  92. string.
  93. DESCRIPTION is an extended description of the component, used in
  94. graphical installers to give the user additional information about the
  95. component. Descriptions can span multiple lines using ``\n`` as the
  96. line separator. Typically, these descriptions should be no more than
  97. a few lines long.
  98. HIDDEN indicates that this component will be hidden in the graphical
  99. installer, so that the user cannot directly change whether it is
  100. installed or not.
  101. REQUIRED indicates that this component is required, and therefore will
  102. always be installed. It will be visible in the graphical installer,
  103. but it cannot be unselected. (Typically, required components are
  104. shown grayed out).
  105. DISABLED indicates that this component should be disabled (unselected)
  106. by default. The user is free to select this component for
  107. installation, unless it is also HIDDEN.
  108. DEPENDS lists the components on which this component depends. If this
  109. component is selected, then each of the components listed must also be
  110. selected. The dependency information is encoded within the installer
  111. itself, so that users cannot install inconsistent sets of components.
  112. GROUP names the component group of which this component is a part. If
  113. not provided, the component will be a standalone component, not part
  114. of any component group. Component groups are described with the
  115. cpack_add_component_group command, detailed below.
  116. INSTALL_TYPES lists the installation types of which this component is
  117. a part. When one of these installations types is selected, this
  118. component will automatically be selected. Installation types are
  119. described with the cpack_add_install_type command, detailed below.
  120. DOWNLOADED indicates that this component should be downloaded
  121. on-the-fly by the installer, rather than packaged in with the
  122. installer itself. For more information, see the
  123. cpack_configure_downloads command.
  124. ARCHIVE_FILE provides a name for the archive file created by CPack to
  125. be used for downloaded components. If not supplied, CPack will create
  126. a file with some name based on CPACK_PACKAGE_FILE_NAME and the name of
  127. the component. See cpack_configure_downloads for more information.
  128. PLIST gives a filename that is passed to pkgbuild with the
  129. ``--component-plist`` argument when using the productbuild generator.
  130. Add component group
  131. """""""""""""""""""
  132. .. command:: cpack_add_component_group
  133. Describes a group of related CPack installation components.
  134. ::
  135. cpack_add_component_group(groupname
  136. [DISPLAY_NAME name]
  137. [DESCRIPTION description]
  138. [PARENT_GROUP parent]
  139. [EXPANDED]
  140. [BOLD_TITLE])
  141. The cpack_add_component_group describes a group of installation
  142. components, which will be placed together within the listing of
  143. options. Typically, component groups allow the user to
  144. select/deselect all of the components within a single group via a
  145. single group-level option. Use component groups to reduce the
  146. complexity of installers with many options. groupname is an arbitrary
  147. name used to identify the group in the GROUP argument of the
  148. cpack_add_component command, which is used to place a component in a
  149. group. The name of the group must not conflict with the name of any
  150. component.
  151. DISPLAY_NAME is the displayed name of the component group, used in
  152. graphical installers to display the component group name. This value
  153. can be any string.
  154. DESCRIPTION is an extended description of the component group, used in
  155. graphical installers to give the user additional information about the
  156. components within that group. Descriptions can span multiple lines
  157. using ``\n`` as the line separator. Typically, these descriptions
  158. should be no more than a few lines long.
  159. PARENT_GROUP, if supplied, names the parent group of this group.
  160. Parent groups are used to establish a hierarchy of groups, providing
  161. an arbitrary hierarchy of groups.
  162. EXPANDED indicates that, by default, the group should show up as
  163. "expanded", so that the user immediately sees all of the components
  164. within the group. Otherwise, the group will initially show up as a
  165. single entry.
  166. BOLD_TITLE indicates that the group title should appear in bold, to
  167. call the user's attention to the group.
  168. Add installation type
  169. """""""""""""""""""""
  170. .. command:: cpack_add_install_type
  171. Add a new installation type containing
  172. a set of predefined component selections to the graphical installer.
  173. ::
  174. cpack_add_install_type(typename
  175. [DISPLAY_NAME name])
  176. The cpack_add_install_type command identifies a set of preselected
  177. components that represents a common use case for an application. For
  178. example, a "Developer" install type might include an application along
  179. with its header and library files, while an "End user" install type
  180. might just include the application's executable. Each component
  181. identifies itself with one or more install types via the INSTALL_TYPES
  182. argument to cpack_add_component.
  183. DISPLAY_NAME is the displayed name of the install type, which will
  184. typically show up in a drop-down box within a graphical installer.
  185. This value can be any string.
  186. Configure downloads
  187. """""""""""""""""""
  188. .. command:: cpack_configure_downloads
  189. Configure CPack to download
  190. selected components on-the-fly as part of the installation process.
  191. ::
  192. cpack_configure_downloads(site
  193. [UPLOAD_DIRECTORY dirname]
  194. [ALL]
  195. [ADD_REMOVE|NO_ADD_REMOVE])
  196. The cpack_configure_downloads command configures installation-time
  197. downloads of selected components. For each downloadable component,
  198. CPack will create an archive containing the contents of that
  199. component, which should be uploaded to the given site. When the user
  200. selects that component for installation, the installer will download
  201. and extract the component in place. This feature is useful for
  202. creating small installers that only download the requested components,
  203. saving bandwidth. Additionally, the installers are small enough that
  204. they will be installed as part of the normal installation process, and
  205. the "Change" button in Windows Add/Remove Programs control panel will
  206. allow one to add or remove parts of the application after the original
  207. installation. On Windows, the downloaded-components functionality
  208. requires the ZipDLL plug-in for NSIS, available at:
  209. ::
  210. http://nsis.sourceforge.net/ZipDLL_plug-in
  211. On macOS, installers that download components on-the-fly can only
  212. be built and installed on system using macOS 10.5 or later.
  213. The site argument is a URL where the archives for downloadable
  214. components will reside, e.g.,
  215. https://cmake.org/files/v3.25/ All of the archives
  216. produced by CPack should be uploaded to that location.
  217. UPLOAD_DIRECTORY is the local directory where CPack will create the
  218. various archives for each of the components. The contents of this
  219. directory should be uploaded to a location accessible by the URL given
  220. in the site argument. If omitted, CPack will use the directory
  221. CPackUploads inside the CMake binary directory to store the generated
  222. archives.
  223. The ALL flag indicates that all components be downloaded. Otherwise,
  224. only those components explicitly marked as DOWNLOADED or that have a
  225. specified ARCHIVE_FILE will be downloaded. Additionally, the ALL
  226. option implies ADD_REMOVE (unless NO_ADD_REMOVE is specified).
  227. ADD_REMOVE indicates that CPack should install a copy of the installer
  228. that can be called from Windows' Add/Remove Programs dialog (via the
  229. "Modify" button) to change the set of installed components.
  230. NO_ADD_REMOVE turns off this behavior. This option is ignored on Mac
  231. OS X.
  232. #]=======================================================================]
  233. # Define var in order to avoid multiple inclusion
  234. if(NOT CPackComponent_CMake_INCLUDED)
  235. set(CPackComponent_CMake_INCLUDED 1)
  236. # Function that appends a SET command for the given variable name (var)
  237. # to the string named strvar, but only if the variable named "var"
  238. # has been defined. The string will eventually be appended to a CPack
  239. # configuration file.
  240. function(cpack_append_variable_set_command var strvar)
  241. if (DEFINED ${var})
  242. string(APPEND ${strvar} "set(${var}")
  243. foreach(APPENDVAL ${${var}})
  244. string(APPEND ${strvar} " ${APPENDVAL}")
  245. endforeach()
  246. string(APPEND ${strvar} ")\n")
  247. set(${strvar} "${${strvar}}" PARENT_SCOPE)
  248. endif ()
  249. endfunction()
  250. # Function that appends a SET command for the given variable name (var)
  251. # to the string named strvar, but only if the variable named "var"
  252. # has been defined and is a string. The string will eventually be
  253. # appended to a CPack configuration file.
  254. function(cpack_append_string_variable_set_command var strvar)
  255. if (DEFINED ${var})
  256. list(LENGTH ${var} CPACK_APP_VALUE_LEN)
  257. if(${CPACK_APP_VALUE_LEN} EQUAL 1)
  258. string(APPEND ${strvar} "set(${var} \"${${var}}\")\n")
  259. endif()
  260. set(${strvar} "${${strvar}}" PARENT_SCOPE)
  261. endif ()
  262. endfunction()
  263. # Macro that appends a SET command for the given list variable name (var)
  264. # to the macro named strvar, but only if the variable named "var"
  265. # has been defined. It's like add variable, but wrap each item to quotes.
  266. # The string will eventually be appended to a CPack configuration file.
  267. macro(cpack_append_list_variable_set_command var strvar)
  268. if (DEFINED ${var})
  269. string(APPEND ${strvar} "set(${var}")
  270. foreach(_val IN LISTS ${var})
  271. string(APPEND ${strvar} "\n \"${_val}\"")
  272. endforeach()
  273. string(APPEND ${strvar} ")\n")
  274. endif ()
  275. endmacro()
  276. # Macro that appends a SET command for the given variable name (var)
  277. # to the macro named strvar, but only if the variable named "var"
  278. # has been set to true. The string will eventually be
  279. # appended to a CPack configuration file.
  280. macro(cpack_append_option_set_command var strvar)
  281. if (${var})
  282. list(LENGTH ${var} CPACK_APP_VALUE_LEN)
  283. if(${CPACK_APP_VALUE_LEN} EQUAL 1)
  284. string(APPEND ${strvar} "set(${var} TRUE)\n")
  285. endif()
  286. endif ()
  287. endmacro()
  288. # Macro that adds a component to the CPack installer
  289. macro(cpack_add_component compname)
  290. string(TOUPPER ${compname} _CPACK_ADDCOMP_UNAME)
  291. cmake_parse_arguments(CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}
  292. "HIDDEN;REQUIRED;DISABLED;DOWNLOADED"
  293. "DISPLAY_NAME;DESCRIPTION;GROUP;ARCHIVE_FILE;PLIST"
  294. "DEPENDS;INSTALL_TYPES"
  295. ${ARGN}
  296. )
  297. if (CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DOWNLOADED)
  298. set(_CPACK_ADDCOMP_STR "\n# Configuration for downloaded component \"${compname}\"\n")
  299. else ()
  300. set(_CPACK_ADDCOMP_STR "\n# Configuration for component \"${compname}\"\n")
  301. endif ()
  302. if(NOT CPACK_MONOLITHIC_INSTALL)
  303. # If the user didn't set CPACK_COMPONENTS_ALL explicitly, update the
  304. # value of CPACK_COMPONENTS_ALL in the configuration file. This will
  305. # take care of any components that have been added after the CPack
  306. # moduled was included.
  307. if(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
  308. get_cmake_property(_CPACK_ADDCOMP_COMPONENTS COMPONENTS)
  309. string(APPEND _CPACK_ADDCOMP_STR "\nSET(CPACK_COMPONENTS_ALL")
  310. foreach(COMP ${_CPACK_ADDCOMP_COMPONENTS})
  311. string(APPEND _CPACK_ADDCOMP_STR " ${COMP}")
  312. endforeach()
  313. string(APPEND _CPACK_ADDCOMP_STR ")\n")
  314. endif()
  315. endif()
  316. cpack_append_string_variable_set_command(
  317. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DISPLAY_NAME
  318. _CPACK_ADDCOMP_STR)
  319. cpack_append_string_variable_set_command(
  320. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DESCRIPTION
  321. _CPACK_ADDCOMP_STR)
  322. cpack_append_variable_set_command(
  323. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_GROUP
  324. _CPACK_ADDCOMP_STR)
  325. cpack_append_variable_set_command(
  326. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DEPENDS
  327. _CPACK_ADDCOMP_STR)
  328. cpack_append_variable_set_command(
  329. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_INSTALL_TYPES
  330. _CPACK_ADDCOMP_STR)
  331. cpack_append_string_variable_set_command(
  332. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_ARCHIVE_FILE
  333. _CPACK_ADDCOMP_STR)
  334. cpack_append_option_set_command(
  335. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_HIDDEN
  336. _CPACK_ADDCOMP_STR)
  337. cpack_append_option_set_command(
  338. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_REQUIRED
  339. _CPACK_ADDCOMP_STR)
  340. cpack_append_option_set_command(
  341. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DISABLED
  342. _CPACK_ADDCOMP_STR)
  343. cpack_append_option_set_command(
  344. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DOWNLOADED
  345. _CPACK_ADDCOMP_STR)
  346. cpack_append_string_variable_set_command(
  347. CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_PLIST
  348. _CPACK_ADDCOMP_STR)
  349. # Backward compatibility issue.
  350. # Write to config iff the macros is used after CPack.cmake has been
  351. # included, other it's not necessary because the variables
  352. # will be encoded by cpack_encode_variables.
  353. if(CPack_CMake_INCLUDED)
  354. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_ADDCOMP_STR}")
  355. endif()
  356. endmacro()
  357. # Macro that adds a component group to the CPack installer
  358. macro(cpack_add_component_group grpname)
  359. string(TOUPPER ${grpname} _CPACK_ADDGRP_UNAME)
  360. cmake_parse_arguments(CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}
  361. "EXPANDED;BOLD_TITLE"
  362. "DISPLAY_NAME;DESCRIPTION;PARENT_GROUP"
  363. ""
  364. ${ARGN}
  365. )
  366. set(_CPACK_ADDGRP_STR "\n# Configuration for component group \"${grpname}\"\n")
  367. cpack_append_string_variable_set_command(
  368. CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}_DISPLAY_NAME
  369. _CPACK_ADDGRP_STR)
  370. cpack_append_string_variable_set_command(
  371. CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}_DESCRIPTION
  372. _CPACK_ADDGRP_STR)
  373. cpack_append_string_variable_set_command(
  374. CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}_PARENT_GROUP
  375. _CPACK_ADDGRP_STR)
  376. cpack_append_option_set_command(
  377. CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}_EXPANDED
  378. _CPACK_ADDGRP_STR)
  379. cpack_append_option_set_command(
  380. CPACK_COMPONENT_GROUP_${_CPACK_ADDGRP_UNAME}_BOLD_TITLE
  381. _CPACK_ADDGRP_STR)
  382. # Backward compatibility issue.
  383. # Write to config iff the macros is used after CPack.cmake has been
  384. # included, other it's not necessary because the variables
  385. # will be encoded by cpack_encode_variables.
  386. if(CPack_CMake_INCLUDED)
  387. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_ADDGRP_STR}")
  388. endif()
  389. endmacro()
  390. # Macro that adds an installation type to the CPack installer
  391. macro(cpack_add_install_type insttype)
  392. string(TOUPPER ${insttype} _CPACK_INSTTYPE_UNAME)
  393. cmake_parse_arguments(CPACK_INSTALL_TYPE_${_CPACK_INSTTYPE_UNAME}
  394. ""
  395. "DISPLAY_NAME"
  396. ""
  397. ${ARGN}
  398. )
  399. set(_CPACK_INSTTYPE_STR
  400. "\n# Configuration for installation type \"${insttype}\"\n")
  401. string(APPEND _CPACK_INSTTYPE_STR
  402. "list(APPEND CPACK_ALL_INSTALL_TYPES ${insttype})\n")
  403. cpack_append_string_variable_set_command(
  404. CPACK_INSTALL_TYPE_${_CPACK_INSTTYPE_UNAME}_DISPLAY_NAME
  405. _CPACK_INSTTYPE_STR)
  406. # Backward compatibility issue.
  407. # Write to config iff the macros is used after CPack.cmake has been
  408. # included, other it's not necessary because the variables
  409. # will be encoded by cpack_encode_variables.
  410. if(CPack_CMake_INCLUDED)
  411. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_INSTTYPE_STR}")
  412. endif()
  413. endmacro()
  414. macro(cpack_configure_downloads site)
  415. cmake_parse_arguments(CPACK_DOWNLOAD
  416. "ALL;ADD_REMOVE;NO_ADD_REMOVE"
  417. "UPLOAD_DIRECTORY"
  418. ""
  419. ${ARGN}
  420. )
  421. set(CPACK_CONFIG_DL_STR
  422. "\n# Downloaded components configuration\n")
  423. set(CPACK_UPLOAD_DIRECTORY ${CPACK_DOWNLOAD_UPLOAD_DIRECTORY})
  424. set(CPACK_DOWNLOAD_SITE ${site})
  425. cpack_append_string_variable_set_command(
  426. CPACK_DOWNLOAD_SITE
  427. CPACK_CONFIG_DL_STR)
  428. cpack_append_string_variable_set_command(
  429. CPACK_UPLOAD_DIRECTORY
  430. CPACK_CONFIG_DL_STR)
  431. cpack_append_option_set_command(
  432. CPACK_DOWNLOAD_ALL
  433. CPACK_CONFIG_DL_STR)
  434. if (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
  435. set(CPACK_DOWNLOAD_ADD_REMOVE ON)
  436. endif ()
  437. set(CPACK_ADD_REMOVE ${CPACK_DOWNLOAD_ADD_REMOVE})
  438. cpack_append_option_set_command(
  439. CPACK_ADD_REMOVE
  440. CPACK_CONFIG_DL_STR)
  441. # Backward compatibility issue.
  442. # Write to config iff the macros is used after CPack.cmake has been
  443. # included, other it's not necessary because the variables
  444. # will be encoded by cpack_encode_variables.
  445. if(CPack_CMake_INCLUDED)
  446. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_CONFIG_DL_STR}")
  447. endif()
  448. endmacro()
  449. endif()