CPack.cmake 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847
  1. # - Build binary and source package installers
  2. #
  3. # The CPack module generates binary and source installers in a variety
  4. # of formats using the cpack program. Inclusion of the CPack module
  5. # adds two new targets to the resulting makefiles, package and
  6. # package_source, which build the binary and source installers,
  7. # respectively. The generated binary installers contain everything
  8. # installed via CMake's INSTALL command (and the deprecated
  9. # INSTALL_FILES, INSTALL_PROGRAMS, and INSTALL_TARGETS commands).
  10. #
  11. # For certain kinds of binary installers (including the graphical
  12. # installers on Mac OS X and Windows), CPack generates installers that
  13. # allow users to select individual application components to
  14. # install. The contents of each of the components are identified by
  15. # the COMPONENT argument of CMake's INSTALL command. These components
  16. # can be annotated with user-friendly names and descriptions,
  17. # inter-component dependencies, etc., and grouped in various ways to
  18. # customize the resulting installer. See the cpack_add_* commands,
  19. # described below, for more information about component-specific
  20. # installations.
  21. #
  22. # Before including the CPack module, there are a variety of variables
  23. # that can be set to customize the resulting installers. The most
  24. # commonly-used variables are:
  25. #
  26. # CPACK_PACKAGE_NAME - The name of the package (or application). If
  27. # not specified, defaults to the project name.
  28. #
  29. # CPACK_PACKAGE_VENDOR - The name of the package vendor (e.g.,
  30. # "Kitware").
  31. #
  32. # CPACK_PACKAGE_VERSION_MAJOR - Package major Version
  33. #
  34. # CPACK_PACKAGE_VERSION_MINOR - Package minor Version
  35. #
  36. # CPACK_PACKAGE_VERSION_PATCH - Package patch Version
  37. #
  38. # CPACK_PACKAGE_DESCRIPTION_FILE - A text file used to describe the
  39. # project. Used, for example, the introduction screen of a
  40. # CPack-generated Windows installer to describe the project.
  41. #
  42. # CPACK_PACKAGE_DESCRIPTION_SUMMARY - Short description of the
  43. # project (only a few words).
  44. #
  45. # CPACK_PACKAGE_FILE_NAME - The name of the package file to generate,
  46. # not including the extension. For example, cmake-2.6.1-Linux-i686.
  47. #
  48. # CPACK_PACKAGE_INSTALL_DIRECTORY - Installation directory on the
  49. # target system, e.g., "CMake 2.5".
  50. #
  51. # CPACK_RESOURCE_FILE_LICENSE - License file for the project, which
  52. # will typically be displayed to the user (often with an explicit
  53. # "Accept" button, for graphical installers) prior to installation.
  54. #
  55. # CPACK_RESOURCE_FILE_README - ReadMe file for the project, which
  56. # typically describes in some detail
  57. #
  58. # CPACK_RESOURCE_FILE_WELCOME - Welcome file for the project, which
  59. # welcomes users to this installer. Typically used in the graphical
  60. # installers on Windows and Mac OS X.
  61. #
  62. # CPACK_MONOLITHIC_INSTALL - Disables the component-based
  63. # installation mechanism, so that all components are always installed.
  64. #
  65. # CPACK_GENERATOR - List of CPack generators to use. If not
  66. # specified, CPack will create a set of options (e.g.,
  67. # CPACK_BINARY_NSIS) allowing the user to enable/disable individual
  68. # generators.
  69. #
  70. # CPACK_OUTPUT_CONFIG_FILE - The name of the CPack configuration file
  71. # for binary installers that will be generated by the CPack
  72. # module. Defaults to CPackConfig.cmake.
  73. #
  74. # CPACK_PACKAGE_EXECUTABLES - Lists each of the executables along
  75. # with a text label, to be used to create Start Menu shortcuts on
  76. # Windows. For example, setting this to the list ccmake;CMake will
  77. # create a shortcut named "CMake" that will execute the installed
  78. # executable ccmake.
  79. #
  80. # CPACK_STRIP_FILES - List of files to be stripped. Starting with
  81. # CMake 2.6.0 CPACK_STRIP_FILES will be a boolean variable which
  82. # enables stripping of all files (a list of files evaluates to TRUE
  83. # in CMake, so this change is compatible).
  84. #
  85. # The following CPack variables are specific to source packages, and
  86. # will not affect binary packages:
  87. #
  88. # CPACK_SOURCE_PACKAGE_FILE_NAME - The name of the source package,
  89. # e.g., cmake-2.6.1
  90. #
  91. # CPACK_SOURCE_STRIP_FILES - List of files in the source tree that
  92. # will be stripped. Starting with CMake 2.6.0
  93. # CPACK_SOURCE_STRIP_FILES will be a boolean variable which enables
  94. # stripping of all files (a list of files evaluates to TRUE in CMake,
  95. # so this change is compatible).
  96. #
  97. # CPACK_SOURCE_GENERATOR - List of generators used for the source
  98. # packages. As with CPACK_GENERATOR, if this is not specified then
  99. # CPack will create a set of options (e.g., CPACK_SOURCE_ZIP)
  100. # allowing users to select which packages will be generated.
  101. #
  102. # CPACK_SOURCE_OUTPUT_CONFIG_FILE - The name of the CPack
  103. # configuration file for source installers that will be generated by
  104. # the CPack module. Defaults to CPackSourceConfig.cmake.
  105. #
  106. # CPACK_SOURCE_IGNORE_FILES - Pattern of files in the source tree
  107. # that won't be packaged when building a source package. This is a
  108. # list of patterns, e.g., /CVS/;/\\.svn/;\\.swp$;\\.#;/#;.*~;cscope.*
  109. #
  110. # The following variables are specific to the graphical installers built
  111. # on Windows using the Nullsoft Installation System.
  112. #
  113. # CPACK_PACKAGE_INSTALL_REGISTRY_KEY - Registry key used when
  114. # installing this project.
  115. #
  116. # CPACK_NSIS_MUI_ICON - The icon file (.ico) for the generated
  117. # install program.
  118. #
  119. # CPACK_NSIS_MUI_UNIICON - The icon file (.ico) for the generated
  120. # uninstall program.
  121. #
  122. # CPACK_PACKAGE_ICON - A branding image that will be displayed inside
  123. # the installer.
  124. #
  125. # CPACK_NSIS_EXTRA_INSTALL_COMMANDS - Extra NSIS commands that will
  126. # be added to the install Section.
  127. #
  128. # CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS - Extra NSIS commands that will
  129. # be added to the uninstall Section.
  130. #
  131. # CPACK_NSIS_COMPRESSOR - The arguments that will be passed to the
  132. # NSIS SetCompressor command.
  133. #
  134. # CPACK_NSIS_MODIFY_PATH - If this is set to "ON", then an extra page
  135. # will appear in the installer that will allow the user to choose
  136. # whether the program directory should be added to the system PATH
  137. # variable.
  138. #
  139. # CPACK_NSIS_DISPLAY_NAME - The title displayed at the top of the
  140. # installer.
  141. #
  142. # CPACK_NSIS_INSTALLED_ICON_NAME - A path to the executable that
  143. # contains the installer icon.
  144. #
  145. # CPACK_NSIS_HELP_LINK - URL to a web site providing assistance in
  146. # installing your application.
  147. #
  148. # CPACK_NSIS_URL_INFO_ABOUT - URL to a web site providing more
  149. # information about your application.
  150. #
  151. # CPACK_NSIS_CONTACT - Contact information for questions and comments
  152. # about the installation process.
  153. #
  154. # CPACK_NSIS_CREATE_ICONS_EXTRA - Additional NSIS commands for
  155. # creating start menu shortcuts.
  156. #
  157. # CPACK_NSIS_DELETE_ICONS_EXTRA -Additional NSIS commands to
  158. # uninstall start menu shortcuts.
  159. #
  160. # The following variable is specific to installers build on Mac OS X
  161. # using PackageMaker:
  162. #
  163. # CPACK_OSX_PACKAGE_VERSION - The version of Mac OS X that the
  164. # resulting PackageMaker archive should be compatible
  165. # with. Different versions of Mac OS X support different
  166. # features. For example, CPack can only build component-based
  167. # installers for Mac OS X 10.4 or newer, and can only build
  168. # installers that download component son-the-fly for Mac OS X 10.5
  169. # or newer. If left blank, this value will be set to the minimum
  170. # version of Mac OS X that supports the requested features. Set this
  171. # variable to some value (e.g., 10.4) only if you want to guarantee
  172. # that your installer will work on that version of Mac OS X, and
  173. # don't mind missing extra features available in the installer
  174. # shipping with later versions of Mac OS X.
  175. #
  176. # The following variables are for advanced uses of CPack:
  177. #
  178. # CPACK_CMAKE_GENERATOR - What CMake generator should be used if the
  179. # project is CMake project. Defaults to the value of CMAKE_GENERATOR;
  180. # few users will want to change this setting.
  181. #
  182. # CPACK_INSTALL_CMAKE_PROJECTS - List of four values that specify
  183. # what project to install. The four values are: Build directory,
  184. # Project Name, Project Component, Directory. If omitted, CPack will
  185. # build an installer that installers everything.
  186. #
  187. # CPACK_SYSTEM_NAME - System name, defaults to the value of
  188. # ${CMAKE_SYSTEM_NAME}.
  189. #
  190. # CPACK_PACKAGE_VERSION - Package full version, used internally. By
  191. # default, this is built from CPACK_PACKAGE_VERSION_MAJOR,
  192. # CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH.
  193. #
  194. # CPACK_TOPLEVEL_TAG - Directory for the installed files.
  195. #
  196. # CPACK_INSTALL_COMMANDS - Extra commands to install components.
  197. #
  198. # CPACK_INSTALL_DIRECTORIES - Extra directories to install.
  199. #
  200. # Component-specific installation allows users to select specific sets
  201. # of components to install during the install process. Installation
  202. # components are identified by the COMPONENT argument of CMake's
  203. # INSTALL commands, and should be further described by the following
  204. # CPack commands:
  205. #
  206. # cpack_add_component - Describes a CPack installation component
  207. # named by the COMPONENT argument to a CMake INSTALL command.
  208. #
  209. # cpack_add_component(compname
  210. # [DISPLAY_NAME name]
  211. # [DESCRIPTION description]
  212. # [HIDDEN | REQUIRED | DISABLED ]
  213. # [GROUP group]
  214. # [DEPENDS comp1 comp2 ... ]
  215. # [INSTALL_TYPES type1 type2 ... ]
  216. # [DOWNLOADED]
  217. # [ARCHIVE_FILE filename])
  218. #
  219. # The cmake_add_component command describes an installation
  220. # component, which the user can opt to install or remove as part of
  221. # the graphical installation process. compname is the name of the
  222. # component, as provided to the COMPONENT argument of one or more
  223. # CMake INSTALL commands.
  224. #
  225. # DISPLAY_NAME is the displayed name of the component, used in
  226. # graphical installers to display the component name. This value can
  227. # be any string.
  228. #
  229. # DESCRIPTION is an extended description of the component, used in
  230. # graphical installers to give the user additional information about
  231. # the component. Descriptions can span multiple lines using "\n" as
  232. # the line separator. Typically, these descriptions should be no
  233. # more than a few lines long.
  234. #
  235. # HIDDEN indicates that this component will be hidden in the
  236. # graphical installer, so that the user cannot directly change
  237. # whether it is installed or not.
  238. #
  239. # REQUIRED indicates that this component is required, and therefore
  240. # will always be installed. It will be visible in the graphical
  241. # installer, but it cannot be unselected. (Typically, required
  242. # components are shown greyed out).
  243. #
  244. # DISABLED indicates that this component should be disabled
  245. # (unselected) by default. The user is free to select this component
  246. # for installation, unless it is also HIDDEN.
  247. #
  248. # DEPENDS lists the components on which this component depends. If
  249. # this component is selected, then each of the components listed
  250. # must also be selected. The dependency information is encoded
  251. # within the installer itself, so that users cannot install
  252. # inconsitent sets of components.
  253. #
  254. # GROUP names the component group of which this component is a
  255. # part. If not provided, the component will be a standalone
  256. # component, not part of any component group. Component groups are
  257. # described with the cpack_add_component_group command, detailed
  258. # below.
  259. #
  260. # INSTALL_TYPES lists the installation types of which this component
  261. # is a part. When one of these installations types is selected, this
  262. # component will automatically be selected. Installation types are
  263. # described with the cpack_add_install_type command, detailed below.
  264. #
  265. # DOWNLOADED indicates that this component should be downloaded
  266. # on-the-fly by the installer, rather than packaged in with the
  267. # installer itself. For more information, see the cpack_configure_downloads
  268. # command.
  269. #
  270. # ARCHIVE_FILE provides a name for the archive file created by CPack
  271. # to be used for downloaded components. If not supplied, CPack will
  272. # create a file with some name based on CPACK_PACKAGE_FILE_NAME and
  273. # the name of the component. See cpack_configure_downloads for more
  274. # information.
  275. #
  276. # cpack_add_component_group - Describes a group of related CPack
  277. # installation components.
  278. #
  279. # cpack_add_component_group(groupname
  280. # [DISPLAY_NAME name]
  281. # [DESCRIPTION description]
  282. # [PARENT_GROUP parent]
  283. # [EXPANDED]
  284. # [BOLD_TITLE])
  285. #
  286. # The cpack_add_component_group describes a group of installation
  287. # components, which will be placed together within the listing of
  288. # options. Typically, component groups allow the user to
  289. # select/deselect all of the components within a single group via a
  290. # single group-level option. Use component groups to reduce the
  291. # complexity of installers with many options. groupname is an
  292. # arbitrary name used to identify the group in the GROUP argument of
  293. # the cpack_add_component command, which is used to place a
  294. # component in a group. The name of the group must not conflict with
  295. # the name of any component.
  296. #
  297. # DISPLAY_NAME is the displayed name of the component group, used in
  298. # graphical installers to display the component group name. This
  299. # value can be any string.
  300. #
  301. # DESCRIPTION is an extended description of the component group,
  302. # used in graphical installers to give the user additional
  303. # information about the components within that group. Descriptions
  304. # can span multiple lines using "\n" as the line
  305. # separator. Typically, these descriptions should be no more than a
  306. # few lines long.
  307. #
  308. # PARENT_GROUP, if supplied, names the parent group of this group.
  309. # Parent groups are used to establish a hierarchy of groups,
  310. # providing an arbitrary hierarchy of groups.
  311. #
  312. # EXPANDED indicates that, by default, the group should show up as
  313. # "expanded", so that the user immediately sees all of the
  314. # components within the group. Otherwise, the group will initially
  315. # show up as a single entry.
  316. #
  317. # BOLD_TITLE indicates that the group title should appear in bold,
  318. # to call the user's attention to the group.
  319. #
  320. # cpack_add_install_type - Add a new installation type containing a
  321. # set of predefined component selections to the graphical installer.
  322. #
  323. # cpack_add_install_type(typename
  324. # [DISPLAY_NAME name])
  325. #
  326. # The cpack_add_install_type command identifies a set of preselected
  327. # components that represents a common use case for an
  328. # application. For example, a "Developer" install type might include
  329. # an application along with its header and library files, while an
  330. # "End user" install type might just include the application's
  331. # executable. Each component identifies itself with one or more
  332. # install types via the INSTALL_TYPES argument to
  333. # cpack_add_component.
  334. #
  335. # DISPLAY_NAME is the displayed name of the install type, which will
  336. # typically show up in a drop-down box within a graphical
  337. # installer. This value can be any string.
  338. #
  339. # cpack_configure_downloads - Configure CPack to download selected
  340. # components on-the-fly as part of the installation process.
  341. #
  342. # cpack_configure_downloads(site
  343. # [UPLOAD_DIRECTORY dirname]
  344. # [ALL]
  345. # [ADD_REMOVE|NO_ADD_REMOVE])
  346. #
  347. # The cpack_configure_downloads command configures installation-time
  348. # downloads of selected components. For each downloadable component,
  349. # CPack will create an archive containing the contents of that
  350. # component, which should be uploaded to the given site. When the
  351. # user selects that component for installation, the installer will
  352. # download and extract the component in place. This feature is
  353. # useful for creating small installers that only download the
  354. # requested components, saving bandwidth. Additionally, the
  355. # installers are small enough that they will be installed as part of
  356. # the normal installation process, and the "Change" button in
  357. # Windows Add/Remove Programs control panel will allow one to add or
  358. # remove parts of the application after the original
  359. # installation. On Windows, the downloaded-components functionality
  360. # requires the ZipDLL plug-in for NSIS, available at:
  361. #
  362. # http://nsis.sourceforge.net/ZipDLL_plug-in
  363. #
  364. # On Mac OS X, installers that download components on-the-fly can
  365. # only be built and installed on system using Mac OS X 10.5 or
  366. # later.
  367. #
  368. # The site argument is a URL where the archives for downloadable
  369. # components will reside, e.g., http://www.cmake.org/files/2.6.1/installer/
  370. # All of the archives produced by CPack should be uploaded to that location.
  371. #
  372. # UPLOAD_DIRECTORY is the local directory where CPack will create the
  373. # various archives for each of the components. The contents of this
  374. # directory should be uploaded to a location accessible by the URL given
  375. # in the site argument. If omitted, CPack will use the directory CPackUploads
  376. # inside the CMake binary directory to store the generated archives.
  377. #
  378. # The ALL flag indicates that all components be downloaded. Otherwise, only
  379. # those components explicitly marked as DOWNLOADED or that have a specified
  380. # ARCHIVE_FILE will be downloaded. Additionally, the ALL option implies
  381. # ADD_REMOVE (unless NO_ADD_REMOVE is specified).
  382. #
  383. # ADD_REMOVE indicates that CPack should install a copy of the installer
  384. # that can be called from Windows' Add/Remove Programs dialog (via the
  385. # "Modify" button) to change the set of installed components. NO_ADD_REMOVE
  386. # turns off this behavior. This option is ignored on Mac OS X.
  387. # Pick a configuration file
  388. SET(cpack_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
  389. IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
  390. SET(cpack_input_file "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
  391. ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackConfig.cmake.in")
  392. SET(cpack_source_input_file "${CMAKE_ROOT}/Templates/CPackConfig.cmake.in")
  393. IF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
  394. SET(cpack_source_input_file "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
  395. ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/CPackSourceConfig.cmake.in")
  396. # Argument-parsing macro from http://www.cmake.org/Wiki/CMakeMacroParseArguments
  397. MACRO(cpack_parse_arguments prefix arg_names option_names)
  398. SET(${prefix}_DEFAULT_ARGS)
  399. FOREACH(arg_name ${arg_names})
  400. SET(${prefix}_${arg_name})
  401. ENDFOREACH(arg_name)
  402. FOREACH(option ${option_names})
  403. SET(${prefix}_${option} FALSE)
  404. ENDFOREACH(option)
  405. SET(current_arg_name DEFAULT_ARGS)
  406. SET(current_arg_list)
  407. FOREACH(arg ${ARGN})
  408. SET(larg_names ${arg_names})
  409. LIST(FIND larg_names "${arg}" is_arg_name)
  410. IF (is_arg_name GREATER -1)
  411. SET(${prefix}_${current_arg_name} ${current_arg_list})
  412. SET(current_arg_name ${arg})
  413. SET(current_arg_list)
  414. ELSE (is_arg_name GREATER -1)
  415. SET(loption_names ${option_names})
  416. LIST(FIND loption_names "${arg}" is_option)
  417. IF (is_option GREATER -1)
  418. SET(${prefix}_${arg} TRUE)
  419. ELSE (is_option GREATER -1)
  420. SET(current_arg_list ${current_arg_list} ${arg})
  421. ENDIF (is_option GREATER -1)
  422. ENDIF (is_arg_name GREATER -1)
  423. ENDFOREACH(arg)
  424. SET(${prefix}_${current_arg_name} ${current_arg_list})
  425. ENDMACRO(cpack_parse_arguments)
  426. # Macro that appends a SET command for the given variable name (var)
  427. # to the macro named strvar, but only if the variable named "var"
  428. # has been defined. The string will eventually be appended to a CPack
  429. # configuration file.
  430. MACRO(cpack_append_variable_set_command var strvar)
  431. IF (DEFINED ${var})
  432. SET(${strvar} "${${strvar}}SET(${var}")
  433. FOREACH(APPENDVAL ${${var}})
  434. SET(${strvar} "${${strvar}} ${APPENDVAL}")
  435. ENDFOREACH(APPENDVAL)
  436. SET(${strvar} "${${strvar}})\n")
  437. ENDIF (DEFINED ${var})
  438. ENDMACRO(cpack_append_variable_set_command)
  439. # Macro that appends a SET command for the given variable name (var)
  440. # to the macro named strvar, but only if the variable named "var"
  441. # has been defined and is a string. The string will eventually be
  442. # appended to a CPack configuration file.
  443. MACRO(cpack_append_string_variable_set_command var strvar)
  444. IF (DEFINED ${var})
  445. LIST(LENGTH ${var} CPACK_APP_VALUE_LEN)
  446. IF(${CPACK_APP_VALUE_LEN} EQUAL 1)
  447. SET(${strvar} "${${strvar}}SET(${var} \"${${var}}\")\n")
  448. ENDIF(${CPACK_APP_VALUE_LEN} EQUAL 1)
  449. ENDIF (DEFINED ${var})
  450. ENDMACRO(cpack_append_string_variable_set_command)
  451. # Macro that appends a SET command for the given variable name (var)
  452. # to the macro named strvar, but only if the variable named "var"
  453. # has been set to true. The string will eventually be
  454. # appended to a CPack configuration file.
  455. MACRO(cpack_append_option_set_command var strvar)
  456. IF (${var})
  457. LIST(LENGTH ${var} CPACK_APP_VALUE_LEN)
  458. IF(${CPACK_APP_VALUE_LEN} EQUAL 1)
  459. SET(${strvar} "${${strvar}}SET(${var} TRUE)\n")
  460. ENDIF(${CPACK_APP_VALUE_LEN} EQUAL 1)
  461. ENDIF (${var})
  462. ENDMACRO(cpack_append_option_set_command)
  463. # Macro that adds a component to the CPack installer
  464. MACRO(cpack_add_component compname)
  465. STRING(TOUPPER ${compname} CPACK_ADDCOMP_UNAME)
  466. cpack_parse_arguments(CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}
  467. "DISPLAY_NAME;DESCRIPTION;GROUP;DEPENDS;INSTALL_TYPES;ARCHIVE_FILE"
  468. "HIDDEN;REQUIRED;DISABLED;DOWNLOADED"
  469. ${ARGN}
  470. )
  471. if (CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DOWNLOADED)
  472. SET(CPACK_ADDCOMP_STR "\n# Configuration for downloaded component \"${compname}\"\n")
  473. else ()
  474. SET(CPACK_ADDCOMP_STR "\n# Configuration for component \"${compname}\"\n")
  475. endif ()
  476. IF(NOT CPACK_MONOLITHIC_INSTALL)
  477. # If the user didn't set CPACK_COMPONENTS_ALL explicitly, update the
  478. # value of CPACK_COMPONENTS_ALL in the configuration file. This will
  479. # take care of any components that have been added after the CPack
  480. # moduled was included.
  481. IF(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
  482. GET_CMAKE_PROPERTY(CPACK_ADDCOMP_COMPONENTS COMPONENTS)
  483. SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR}\nSET(CPACK_COMPONENTS_ALL")
  484. FOREACH(COMP ${CPACK_ADDCOMP_COMPONENTS})
  485. SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR} ${COMP}")
  486. ENDFOREACH(COMP)
  487. SET(CPACK_ADDCOMP_STR "${CPACK_ADDCOMP_STR})\n")
  488. ENDIF(NOT CPACK_COMPONENTS_ALL_SET_BY_USER)
  489. ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
  490. cpack_append_string_variable_set_command(
  491. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DISPLAY_NAME
  492. CPACK_ADDCOMP_STR)
  493. cpack_append_string_variable_set_command(
  494. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DESCRIPTION
  495. CPACK_ADDCOMP_STR)
  496. cpack_append_variable_set_command(
  497. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_GROUP
  498. CPACK_ADDCOMP_STR)
  499. cpack_append_variable_set_command(
  500. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DEPENDS
  501. CPACK_ADDCOMP_STR)
  502. cpack_append_variable_set_command(
  503. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_INSTALL_TYPES
  504. CPACK_ADDCOMP_STR)
  505. cpack_append_string_variable_set_command(
  506. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_ARCHIVE_FILE
  507. CPACK_ADDCOMP_STR)
  508. cpack_append_option_set_command(
  509. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_HIDDEN
  510. CPACK_ADDCOMP_STR)
  511. cpack_append_option_set_command(
  512. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_REQUIRED
  513. CPACK_ADDCOMP_STR)
  514. cpack_append_option_set_command(
  515. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DISABLED
  516. CPACK_ADDCOMP_STR)
  517. cpack_append_option_set_command(
  518. CPACK_COMPONENT_${CPACK_ADDCOMP_UNAME}_DOWNLOADED
  519. CPACK_ADDCOMP_STR)
  520. FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDCOMP_STR}")
  521. ENDMACRO(cpack_add_component)
  522. # Macro that adds a component group to the CPack installer
  523. MACRO(cpack_add_component_group grpname)
  524. STRING(TOUPPER ${grpname} CPACK_ADDGRP_UNAME)
  525. cpack_parse_arguments(CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}
  526. "DISPLAY_NAME;DESCRIPTION"
  527. "EXPANDED;BOLD_TITLE"
  528. ${ARGN}
  529. )
  530. SET(CPACK_ADDGRP_STR "\n# Configuration for component group \"${grpname}\"\n")
  531. cpack_append_string_variable_set_command(
  532. CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_DISPLAY_NAME
  533. CPACK_ADDGRP_STR)
  534. cpack_append_string_variable_set_command(
  535. CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_DESCRIPTION
  536. CPACK_ADDGRP_STR)
  537. cpack_append_option_set_command(
  538. CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_EXPANDED
  539. CPACK_ADDGRP_STR)
  540. cpack_append_option_set_command(
  541. CPACK_COMPONENT_GROUP_${CPACK_ADDGRP_UNAME}_BOLD_TITLE
  542. CPACK_ADDGRP_STR)
  543. FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_ADDGRP_STR}")
  544. ENDMACRO(cpack_add_component_group)
  545. # Macro that adds an installation type to the CPack installer
  546. MACRO(cpack_add_install_type insttype)
  547. STRING(TOUPPER ${insttype} CPACK_INSTTYPE_UNAME)
  548. cpack_parse_arguments(CPACK_INSTALL_TYPE_${CPACK_INSTTYPE_UNAME}
  549. "DISPLAY_NAME"
  550. ""
  551. ${ARGN}
  552. )
  553. SET(CPACK_INSTTYPE_STR
  554. "\n# Configuration for installation type \"${insttype}\"\n")
  555. SET(CPACK_INSTTYPE_STR
  556. "${CPACK_INSTTYPE_STR}LIST(APPEND CPACK_ALL_INSTALL_TYPES ${insttype})\n")
  557. cpack_append_string_variable_set_command(
  558. CPACK_INSTALL_TYPE_${CPACK_INSTTYPE_UNAME}_DISPLAY_NAME
  559. CPACK_INSTTYPE_STR)
  560. FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_INSTTYPE_STR}")
  561. ENDMACRO(cpack_add_install_type)
  562. MACRO(cpack_configure_downloads site)
  563. cpack_parse_arguments(CPACK_DOWNLOAD
  564. "UPLOAD_DIRECTORY"
  565. "ALL;ADD_REMOVE;NO_ADD_REMOVE"
  566. ${ARGN}
  567. )
  568. SET(CPACK_CONFIG_DL_STR
  569. "\n# Downloaded components configuration\n")
  570. SET(CPACK_UPLOAD_DIRECTORY ${CPACK_DOWNLOAD_UPLOAD_DIRECTORY})
  571. SET(CPACK_DOWNLOAD_SITE ${site})
  572. cpack_append_string_variable_set_command(
  573. CPACK_DOWNLOAD_SITE
  574. CPACK_CONFIG_DL_STR)
  575. cpack_append_string_variable_set_command(
  576. CPACK_UPLOAD_DIRECTORY
  577. CPACK_CONFIG_DL_STR)
  578. cpack_append_option_set_command(
  579. CPACK_DOWNLOAD_ALL
  580. CPACK_CONFIG_DL_STR)
  581. IF (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
  582. SET(CPACK_DOWNLOAD_ADD_REMOVE ON)
  583. ENDIF (${CPACK_DOWNLOAD_ALL} AND NOT ${CPACK_DOWNLOAD_NO_ADD_REMOVE})
  584. SET(CPACK_ADD_REMOVE ${CPACK_DOWNLOAD_ADD_REMOVE})
  585. cpack_append_option_set_command(
  586. CPACK_ADD_REMOVE
  587. CPACK_CONFIG_DL_STR)
  588. FILE(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${CPACK_CONFIG_DL_STR}")
  589. ENDMACRO(cpack_configure_downloads)
  590. # Macro for setting values if a user did not overwrite them
  591. MACRO(cpack_set_if_not_set name value)
  592. IF(NOT DEFINED "${name}")
  593. SET(${name} "${value}")
  594. ENDIF(NOT DEFINED "${name}")
  595. ENDMACRO(cpack_set_if_not_set)
  596. # Macro to encode variables for the configuration file
  597. # find any varable that stars with CPACK and create a variable
  598. # _CPACK_OTHER_VARIABLES_ that contains SET commands for
  599. # each cpack variable. _CPACK_OTHER_VARIABLES_ is then
  600. # used as an @ replacment in configure_file for the CPackConfig.
  601. MACRO(cpack_encode_variables)
  602. SET(_CPACK_OTHER_VARIABLES_)
  603. GET_CMAKE_PROPERTY(res VARIABLES)
  604. FOREACH(var ${res})
  605. IF("xxx${var}" MATCHES "xxxCPACK")
  606. SET(_CPACK_OTHER_VARIABLES_
  607. "${_CPACK_OTHER_VARIABLES_}\nSET(${var} \"${${var}}\")")
  608. ENDIF("xxx${var}" MATCHES "xxxCPACK")
  609. ENDFOREACH(var ${res})
  610. ENDMACRO(cpack_encode_variables)
  611. # Set the package name
  612. cpack_set_if_not_set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
  613. cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MAJOR "0")
  614. cpack_set_if_not_set(CPACK_PACKAGE_VERSION_MINOR "1")
  615. cpack_set_if_not_set(CPACK_PACKAGE_VERSION_PATCH "1")
  616. cpack_set_if_not_set(CPACK_PACKAGE_VERSION
  617. "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
  618. cpack_set_if_not_set(CPACK_PACKAGE_VENDOR "Humanity")
  619. cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
  620. "${CMAKE_PROJECT_NAME} built using CMake")
  621. cpack_set_if_not_set(CPACK_PACKAGE_DESCRIPTION_FILE
  622. "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
  623. cpack_set_if_not_set(CPACK_RESOURCE_FILE_LICENSE
  624. "${CMAKE_ROOT}/Templates/CPack.GenericLicense.txt")
  625. cpack_set_if_not_set(CPACK_RESOURCE_FILE_README
  626. "${CMAKE_ROOT}/Templates/CPack.GenericDescription.txt")
  627. cpack_set_if_not_set(CPACK_RESOURCE_FILE_WELCOME
  628. "${CMAKE_ROOT}/Templates/CPack.GenericWelcome.txt")
  629. cpack_set_if_not_set(CPACK_MODULE_PATH "${CMAKE_MODULE_PATH}")
  630. IF(CPACK_NSIS_MODIFY_PATH)
  631. SET(CPACK_NSIS_MODIFY_PATH ON)
  632. ENDIF(CPACK_NSIS_MODIFY_PATH)
  633. SET(__cpack_system_name ${CMAKE_SYSTEM_NAME})
  634. IF(${__cpack_system_name} MATCHES Windows)
  635. IF(CMAKE_CL_64)
  636. SET(__cpack_system_name win64)
  637. ELSE(CMAKE_CL_64)
  638. SET(__cpack_system_name win32)
  639. ENDIF(CMAKE_CL_64)
  640. ENDIF(${__cpack_system_name} MATCHES Windows)
  641. cpack_set_if_not_set(CPACK_SYSTEM_NAME "${__cpack_system_name}")
  642. # <project>-<major>.<minor>.<patch>-<release>-<platform>.<pkgtype>
  643. cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME
  644. "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
  645. cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY
  646. "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
  647. cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
  648. "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
  649. cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
  650. cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true")
  651. # always force to exactly "true" or "false" for CPack.Info.plist.in:
  652. if(CPACK_PACKAGE_RELOCATABLE)
  653. set(CPACK_PACKAGE_RELOCATABLE "true")
  654. else(CPACK_PACKAGE_RELOCATABLE)
  655. set(CPACK_PACKAGE_RELOCATABLE "false")
  656. endif(CPACK_PACKAGE_RELOCATABLE)
  657. macro(cpack_check_file_exists file description)
  658. if(NOT EXISTS "${file}")
  659. message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.")
  660. endif(NOT EXISTS "${file}")
  661. endmacro(cpack_check_file_exists)
  662. cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description")
  663. cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource")
  664. cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource")
  665. cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource")
  666. macro(cpack_optional_append _list _cond _item)
  667. if(${_cond})
  668. set(${_list} ${${_list}} ${_item})
  669. endif(${_cond})
  670. endmacro(cpack_optional_append _list _cond _item)
  671. # Provide options to choose generators
  672. # we might check here if the required tools for the generates exist
  673. # and set the defaults according to the results
  674. if(NOT CPACK_GENERATOR)
  675. if(UNIX)
  676. if(CYGWIN)
  677. option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON)
  678. else(CYGWIN)
  679. if(APPLE)
  680. option(CPACK_BINARY_BUNDLE "Enable to build OSX bundles" OFF)
  681. option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON)
  682. option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF)
  683. else(APPLE)
  684. option(CPACK_BINARY_TZ "Enable to build TZ packages" ON)
  685. endif(APPLE)
  686. option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON)
  687. option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON)
  688. option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" ON)
  689. option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF)
  690. option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF)
  691. option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF)
  692. endif(CYGWIN)
  693. else(UNIX)
  694. option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON)
  695. option(CPACK_BINARY_ZIP "Enable to build ZIP packages" ON)
  696. endif(UNIX)
  697. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_BUNDLE Bundle)
  698. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker)
  699. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11)
  700. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary)
  701. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB)
  702. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_RPM RPM)
  703. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS)
  704. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_STGZ STGZ)
  705. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ)
  706. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2)
  707. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ)
  708. cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP)
  709. endif(NOT CPACK_GENERATOR)
  710. # Provide options to choose source generators
  711. if(NOT CPACK_SOURCE_GENERATOR)
  712. if(UNIX)
  713. if(CYGWIN)
  714. option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON)
  715. else(CYGWIN)
  716. option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON)
  717. option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON)
  718. option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON)
  719. option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF)
  720. endif(CYGWIN)
  721. else(UNIX)
  722. option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON)
  723. endif(UNIX)
  724. cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource)
  725. cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ)
  726. cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2)
  727. cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ)
  728. cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP)
  729. endif(NOT CPACK_SOURCE_GENERATOR)
  730. # mark the above options as advanced
  731. mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11
  732. CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2
  733. CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ
  734. CPACK_BINARY_NSIS CPACK_BINARY_ZIP CPACK_BINARY_BUNDLE
  735. CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ
  736. CPACK_SOURCE_TZ CPACK_SOURCE_ZIP)
  737. # Set some other variables
  738. cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS
  739. "${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/")
  740. cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
  741. cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}")
  742. cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "@CPACK_PACKAGE_INSTALL_DIRECTORY@")
  743. cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE
  744. "${CMAKE_BINARY_DIR}/CPackConfig.cmake")
  745. cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE
  746. "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake")
  747. cpack_set_if_not_set(CPACK_SET_DESTDIR OFF)
  748. cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
  749. cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "")
  750. cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
  751. IF(DEFINED CPACK_COMPONENTS_ALL)
  752. IF(CPACK_MONOLITHIC_INSTALL)
  753. MESSAGE("CPack warning: both CPACK_COMPONENTS_ALL and CPACK_MONOLITHIC_INSTALL have been set.\nDefaulting to a monolithic installation.")
  754. SET(CPACK_COMPONENTS_ALL)
  755. ELSE(CPACK_MONOLITHIC_INSTALL)
  756. # The user has provided the set of components to be installed as
  757. # part of a component-based installation; trust her.
  758. SET(CPACK_COMPONENTS_ALL_SET_BY_USER TRUE)
  759. ENDIF(CPACK_MONOLITHIC_INSTALL)
  760. ELSE(DEFINED CPACK_COMPONENTS_ALL)
  761. # If the user has not specifically requested a monolithic installer
  762. # but has specified components in various "install" commands, tell
  763. # CPack about those components.
  764. IF(NOT CPACK_MONOLITHIC_INSTALL)
  765. GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
  766. LIST(LENGTH CPACK_COMPONENTS_ALL CPACK_COMPONENTS_LEN)
  767. IF(CPACK_COMPONENTS_LEN EQUAL 1)
  768. # Only one component: this is not a component-based installation
  769. # (at least, it isn't a component-based installation, but may
  770. # become one later if the user uses the cpack_add_* commands).
  771. SET(CPACK_COMPONENTS_ALL)
  772. ENDIF(CPACK_COMPONENTS_LEN EQUAL 1)
  773. SET(CPACK_COMPONENTS_LEN)
  774. ENDIF(NOT CPACK_MONOLITHIC_INSTALL)
  775. ENDIF(DEFINED CPACK_COMPONENTS_ALL)
  776. # CMake always generates a component named "Unspecified", which is
  777. # used to install everything that doesn't have an explicitly-provided
  778. # component. Since these files should always be installed, we'll make
  779. # them hidden and required.
  780. set(CPACK_COMPONENT_UNSPECIFIED_HIDDEN TRUE)
  781. set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED TRUE)
  782. cpack_encode_variables()
  783. configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)
  784. # Generate source file
  785. cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES
  786. "${CMAKE_SOURCE_DIR};/")
  787. cpack_set_if_not_set(CPACK_SOURCE_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}-Source")
  788. cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME
  789. "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source")
  790. cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES
  791. "/CVS/;/\\\\\\\\.svn/;\\\\\\\\.swp$;\\\\\\\\.#;/#")
  792. SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}")
  793. SET(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}")
  794. SET(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}")
  795. SET(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}")
  796. SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
  797. SET(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
  798. SET(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
  799. cpack_encode_variables()
  800. configure_file("${cpack_source_input_file}"
  801. "${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE)