CPackIFW.cmake 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  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. # CPackIFW
  5. # --------
  6. #
  7. # .. _QtIFW: http://doc.qt.io/qtinstallerframework/index.html
  8. #
  9. # This module looks for the location of the command line utilities supplied
  10. # with the Qt Installer Framework (QtIFW_).
  11. #
  12. # The module also defines several commands to control the behavior of the
  13. # CPack ``IFW`` generator.
  14. #
  15. #
  16. # Overview
  17. # ^^^^^^^^
  18. #
  19. # CPack ``IFW`` generator helps you to create online and offline
  20. # binary cross-platform installers with a graphical user interface.
  21. #
  22. # CPack IFW generator prepares project installation and generates configuration
  23. # and meta information for QtIFW_ tools.
  24. #
  25. # The QtIFW_ provides a set of tools and utilities to create
  26. # installers for the supported desktop Qt platforms: Linux, Microsoft Windows,
  27. # and Mac OS X.
  28. #
  29. # You should also install QtIFW_ to use CPack ``IFW`` generator.
  30. #
  31. # Hints
  32. # ^^^^^
  33. #
  34. # Generally, the CPack ``IFW`` generator automatically finds QtIFW_ tools,
  35. # but if you don't use a default path for installation of the QtIFW_ tools,
  36. # the path may be specified in either a CMake or an environment variable:
  37. #
  38. # .. variable:: CPACK_IFW_ROOT
  39. #
  40. # An CMake variable which specifies the location of the QtIFW_ tool suite.
  41. #
  42. # The variable will be cached in the ``CPackConfig.cmake`` file and used at
  43. # CPack runtime.
  44. #
  45. # .. variable:: QTIFWDIR
  46. #
  47. # An environment variable which specifies the location of the QtIFW_ tool
  48. # suite.
  49. #
  50. # .. note::
  51. # The specified path should not contain "bin" at the end
  52. # (for example: "D:\\DevTools\\QtIFW2.0.5").
  53. #
  54. # The :variable:`CPACK_IFW_ROOT` variable has a higher priority and overrides
  55. # the value of the :variable:`QTIFWDIR` variable.
  56. #
  57. # Internationalization
  58. # ^^^^^^^^^^^^^^^^^^^^
  59. #
  60. # Some variables and command arguments support internationalization via
  61. # CMake script. This is an optional feature.
  62. #
  63. # Installers created by QtIFW_ tools have built-in support for
  64. # internationalization and many phrases are localized to many languages,
  65. # but this does not apply to the description of the your components and groups
  66. # that will be distributed.
  67. #
  68. # Localization of the description of your components and groups is useful for
  69. # users of your installers.
  70. #
  71. # A localized variable or argument can contain a single default value, and a
  72. # set of pairs the name of the locale and the localized value.
  73. #
  74. # For example:
  75. #
  76. # .. code-block:: cmake
  77. #
  78. # set(LOCALIZABLE_VARIABLE "Default value"
  79. # en "English value"
  80. # en_US "American value"
  81. # en_GB "Great Britain value"
  82. # )
  83. #
  84. # Variables
  85. # ^^^^^^^^^
  86. #
  87. # You can use the following variables to change behavior of CPack ``IFW``
  88. # generator.
  89. #
  90. # Debug
  91. # """"""
  92. #
  93. # .. variable:: CPACK_IFW_VERBOSE
  94. #
  95. # Set to ``ON`` to enable addition debug output.
  96. # By default is ``OFF``.
  97. #
  98. # Package
  99. # """""""
  100. #
  101. # .. variable:: CPACK_IFW_PACKAGE_TITLE
  102. #
  103. # Name of the installer as displayed on the title bar.
  104. # By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
  105. #
  106. # .. variable:: CPACK_IFW_PACKAGE_PUBLISHER
  107. #
  108. # Publisher of the software (as shown in the Windows Control Panel).
  109. # By default used :variable:`CPACK_PACKAGE_VENDOR`.
  110. #
  111. # .. variable:: CPACK_IFW_PRODUCT_URL
  112. #
  113. # URL to a page that contains product information on your web site.
  114. #
  115. # .. variable:: CPACK_IFW_PACKAGE_ICON
  116. #
  117. # Filename for a custom installer icon. The actual file is '.icns' (Mac OS X),
  118. # '.ico' (Windows). No functionality on Unix.
  119. #
  120. # .. variable:: CPACK_IFW_PACKAGE_WINDOW_ICON
  121. #
  122. # Filename for a custom window icon in PNG format for the Installer
  123. # application.
  124. #
  125. # .. variable:: CPACK_IFW_PACKAGE_LOGO
  126. #
  127. # Filename for a logo is used as QWizard::LogoPixmap.
  128. #
  129. # .. variable:: CPACK_IFW_PACKAGE_WATERMARK
  130. #
  131. # Filename for a watermark is used as QWizard::WatermarkPixmap.
  132. #
  133. # .. variable:: CPACK_IFW_PACKAGE_BANNER
  134. #
  135. # Filename for a banner is used as QWizard::BannerPixmap.
  136. #
  137. # .. variable:: CPACK_IFW_PACKAGE_BACKGROUND
  138. #
  139. # Filename for an image used as QWizard::BackgroundPixmap (only used by MacStyle).
  140. #
  141. # .. variable:: CPACK_IFW_PACKAGE_WIZARD_STYLE
  142. #
  143. # Wizard style to be used ("Modern", "Mac", "Aero" or "Classic").
  144. #
  145. # .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH
  146. #
  147. # Default width of the wizard in pixels. Setting a banner image will override this.
  148. #
  149. # .. variable:: CPACK_IFW_PACKAGE_WIZARD_DEFAULT_HEIGHT
  150. #
  151. # Default height of the wizard in pixels. Setting a watermark image will override this.
  152. #
  153. # .. variable:: CPACK_IFW_PACKAGE_TITLE_COLOR
  154. #
  155. # Color of the titles and subtitles (takes an HTML color code, such as "#88FF33").
  156. #
  157. # .. variable:: CPACK_IFW_PACKAGE_START_MENU_DIRECTORY
  158. #
  159. # Name of the default program group for the product in the Windows Start menu.
  160. #
  161. # By default used :variable:`CPACK_IFW_PACKAGE_NAME`.
  162. #
  163. # .. variable:: CPACK_IFW_TARGET_DIRECTORY
  164. #
  165. # Default target directory for installation.
  166. # By default used
  167. # "@ApplicationsDir@/:variable:`CPACK_PACKAGE_INSTALL_DIRECTORY`"
  168. #
  169. # You can use predefined variables.
  170. #
  171. # .. variable:: CPACK_IFW_ADMIN_TARGET_DIRECTORY
  172. #
  173. # Default target directory for installation with administrator rights.
  174. #
  175. # You can use predefined variables.
  176. #
  177. # .. variable:: CPACK_IFW_PACKAGE_GROUP
  178. #
  179. # The group, which will be used to configure the root package
  180. #
  181. # .. variable:: CPACK_IFW_PACKAGE_NAME
  182. #
  183. # The root package name, which will be used if configuration group is not
  184. # specified
  185. #
  186. # .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME
  187. #
  188. # Filename of the generated maintenance tool.
  189. # The platform-specific executable file extension is appended.
  190. #
  191. # By default used QtIFW_ defaults (``maintenancetool``).
  192. #
  193. # .. variable:: CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR
  194. #
  195. # Set to ``OFF`` if the target directory should not be deleted when uninstalling.
  196. #
  197. # Is ``ON`` by default
  198. #
  199. # .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE
  200. #
  201. # Filename for the configuration of the generated maintenance tool.
  202. #
  203. # By default used QtIFW_ defaults (``maintenancetool.ini``).
  204. #
  205. # .. variable:: CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS
  206. #
  207. # Set to ``ON`` if the installation path can contain non-ASCII characters.
  208. #
  209. # Is ``ON`` for QtIFW_ less 2.0 tools.
  210. #
  211. # .. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH
  212. #
  213. # Set to ``OFF`` if the installation path cannot contain space characters.
  214. #
  215. # Is ``ON`` for QtIFW_ less 2.0 tools.
  216. #
  217. # .. variable:: CPACK_IFW_PACKAGE_CONTROL_SCRIPT
  218. #
  219. # Filename for a custom installer control script.
  220. #
  221. # .. variable:: CPACK_IFW_PACKAGE_RESOURCES
  222. #
  223. # List of additional resources ('.qrc' files) to include in the installer
  224. # binary.
  225. #
  226. # You can use :command:`cpack_ifw_add_package_resources` command to resolve
  227. # relative paths.
  228. #
  229. # .. variable:: CPACK_IFW_PACKAGE_FILE_EXTENSION
  230. #
  231. # The target binary extension.
  232. #
  233. # On Linux, the name of the target binary is automatically extended with
  234. # '.run', if you do not specify the extension.
  235. #
  236. # On Windows, the target is created as an application with the extension
  237. # '.exe', which is automatically added, if not supplied.
  238. #
  239. # On Mac, the target is created as an DMG disk image with the extension
  240. # '.dmg', which is automatically added, if not supplied.
  241. #
  242. # .. variable:: CPACK_IFW_REPOSITORIES_ALL
  243. #
  244. # The list of remote repositories.
  245. #
  246. # The default value of this variable is computed by CPack and contains
  247. # all repositories added with command :command:`cpack_ifw_add_repository`
  248. # or updated with command :command:`cpack_ifw_update_repository`.
  249. #
  250. # .. variable:: CPACK_IFW_DOWNLOAD_ALL
  251. #
  252. # If this is ``ON`` all components will be downloaded.
  253. # By default is ``OFF`` or used value
  254. # from ``CPACK_DOWNLOAD_ALL`` if set
  255. #
  256. # Components
  257. # """"""""""
  258. #
  259. # .. variable:: CPACK_IFW_RESOLVE_DUPLICATE_NAMES
  260. #
  261. # Resolve duplicate names when installing components with groups.
  262. #
  263. # .. variable:: CPACK_IFW_PACKAGES_DIRECTORIES
  264. #
  265. # Additional prepared packages dirs that will be used to resolve
  266. # dependent components.
  267. #
  268. # .. variable:: CPACK_IFW_REPOSITORIES_DIRECTORIES
  269. #
  270. # Additional prepared repository dirs that will be used to resolve and
  271. # repack dependent components. This feature available only
  272. # since QtIFW_ 3.1.
  273. #
  274. # Tools
  275. # """""
  276. #
  277. # .. variable:: CPACK_IFW_FRAMEWORK_VERSION
  278. #
  279. # The version of used QtIFW_ tools.
  280. #
  281. # .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE
  282. #
  283. # The path to "binarycreator" command line client.
  284. #
  285. # This variable is cached and may be configured if needed.
  286. #
  287. # .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE
  288. #
  289. # The path to "repogen" command line client.
  290. #
  291. # This variable is cached and may be configured if needed.
  292. #
  293. # .. variable:: CPACK_IFW_INSTALLERBASE_EXECUTABLE
  294. #
  295. # The path to "installerbase" installer executable base.
  296. #
  297. # This variable is cached and may be configured if needed.
  298. #
  299. # .. variable:: CPACK_IFW_DEVTOOL_EXECUTABLE
  300. #
  301. # The path to "devtool" command line client.
  302. #
  303. # This variable is cached and may be configured if needed.
  304. #
  305. # Commands
  306. # ^^^^^^^^^
  307. #
  308. # The module defines the following commands:
  309. #
  310. # .. command:: cpack_ifw_configure_component
  311. #
  312. # Sets the arguments specific to the CPack IFW generator.
  313. #
  314. # ::
  315. #
  316. # cpack_ifw_configure_component(<compname> [COMMON] [ESSENTIAL] [VIRTUAL]
  317. # [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
  318. # [NAME <name>]
  319. # [DISPLAY_NAME <display_name>] # Note: Internationalization supported
  320. # [DESCRIPTION <description>] # Note: Internationalization supported
  321. # [UPDATE_TEXT <update_text>]
  322. # [VERSION <version>]
  323. # [RELEASE_DATE <release_date>]
  324. # [SCRIPT <script>]
  325. # [PRIORITY|SORTING_PRIORITY <sorting_priority>] # Note: PRIORITY is deprecated
  326. # [DEPENDS|DEPENDENCIES <com_id> ...]
  327. # [AUTO_DEPEND_ON <comp_id> ...]
  328. # [LICENSES <display_name> <file_path> ...]
  329. # [DEFAULT <value>]
  330. # [USER_INTERFACES <file_path> <file_path> ...]
  331. # [TRANSLATIONS <file_path> <file_path> ...]
  332. # [REPLACES <comp_id> ...]
  333. # [CHECKABLE <value>])
  334. #
  335. # This command should be called after :command:`cpack_add_component` command.
  336. #
  337. # ``COMMON``
  338. # if set, then the component will be packaged and installed as part
  339. # of a group to which it belongs.
  340. #
  341. # ``ESSENTIAL``
  342. # if set, then the package manager stays disabled until that
  343. # component is updated.
  344. #
  345. # ``VIRTUAL``
  346. # if set, then the component will be hidden from the installer.
  347. # It is a equivalent of the ``HIDDEN`` option from the
  348. # :command:`cpack_add_component` command.
  349. #
  350. # ``FORCED_INSTALLATION``
  351. # if set, then the component must always be installed.
  352. # It is a equivalent of the ``REQUARED`` option from the
  353. # :command:`cpack_add_component` command.
  354. #
  355. # ``REQUIRES_ADMIN_RIGHTS``
  356. # set it if the component needs to be installed with elevated permissions.
  357. #
  358. # ``NAME``
  359. # is used to create domain-like identification for this component.
  360. # By default used origin component name.
  361. #
  362. # ``DISPLAY_NAME``
  363. # set to rewrite original name configured by
  364. # :command:`cpack_add_component` command.
  365. #
  366. # ``DESCRIPTION``
  367. # set to rewrite original description configured by
  368. # :command:`cpack_add_component` command.
  369. #
  370. # ``UPDATE_TEXT``
  371. # will be added to the component description if this is an update to
  372. # the component.
  373. #
  374. # ``VERSION``
  375. # is version of component.
  376. # By default used :variable:`CPACK_PACKAGE_VERSION`.
  377. #
  378. # ``RELEASE_DATE``
  379. # keep empty to auto generate.
  380. #
  381. # ``SCRIPT``
  382. # is a relative or absolute path to operations script
  383. # for this component.
  384. #
  385. # ``PRIORITY`` | ``SORTING_PRIORITY``
  386. # is priority of the component in the tree.
  387. # The ``PRIORITY`` option is deprecated and will be removed in a future
  388. # version of CMake. Please use ``SORTING_PRIORITY`` option instead.
  389. #
  390. # ``DEPENDS`` | ``DEPENDENCIES``
  391. # list of dependency component or component group identifiers in
  392. # QtIFW_ style.
  393. #
  394. # ``AUTO_DEPEND_ON``
  395. # list of identifiers of component or component group in QtIFW_ style
  396. # that this component has an automatic dependency on.
  397. #
  398. # ``LICENSES``
  399. # pair of <display_name> and <file_path> of license text for this
  400. # component. You can specify more then one license.
  401. #
  402. # ``DEFAULT``
  403. # Possible values are: TRUE, FALSE, and SCRIPT.
  404. # Set to FALSE to disable the component in the installer or to SCRIPT
  405. # to resolved during runtime (don't forget add the file of the script
  406. # as a value of the ``SCRIPT`` option).
  407. #
  408. # ``USER_INTERFACES``
  409. # is a list of <file_path> ('.ui' files) representing pages to load.
  410. #
  411. # ``TRANSLATIONS``
  412. # is a list of <file_path> ('.qm' files) representing translations to load.
  413. #
  414. # ``REPLACES``
  415. # list of identifiers of component or component group to replace.
  416. #
  417. # ``CHECKABLE``
  418. # Possible values are: TRUE, FALSE.
  419. # Set to FALSE if you want to hide the checkbox for an item.
  420. # This is useful when only a few subcomponents should be selected
  421. # instead of all.
  422. #
  423. #
  424. # .. command:: cpack_ifw_configure_component_group
  425. #
  426. # Sets the arguments specific to the CPack IFW generator.
  427. #
  428. # ::
  429. #
  430. # cpack_ifw_configure_component_group(<groupname> [VIRTUAL]
  431. # [FORCED_INSTALLATION] [REQUIRES_ADMIN_RIGHTS]
  432. # [NAME <name>]
  433. # [DISPLAY_NAME <display_name>] # Note: Internationalization supported
  434. # [DESCRIPTION <description>] # Note: Internationalization supported
  435. # [UPDATE_TEXT <update_text>]
  436. # [VERSION <version>]
  437. # [RELEASE_DATE <release_date>]
  438. # [SCRIPT <script>]
  439. # [PRIORITY|SORTING_PRIORITY <sorting_priority>] # Note: PRIORITY is deprecated
  440. # [DEPENDS|DEPENDENCIES <com_id> ...]
  441. # [AUTO_DEPEND_ON <comp_id> ...]
  442. # [LICENSES <display_name> <file_path> ...]
  443. # [DEFAULT <value>]
  444. # [USER_INTERFACES <file_path> <file_path> ...]
  445. # [TRANSLATIONS <file_path> <file_path> ...]
  446. # [REPLACES <comp_id> ...]
  447. # [CHECKABLE <value>])
  448. #
  449. # This command should be called after :command:`cpack_add_component_group`
  450. # command.
  451. #
  452. # ``VIRTUAL``
  453. # if set, then the group will be hidden from the installer.
  454. # Note that setting this on a root component does not work.
  455. #
  456. # ``FORCED_INSTALLATION``
  457. # if set, then the group must always be installed.
  458. #
  459. # ``REQUIRES_ADMIN_RIGHTS``
  460. # set it if the component group needs to be installed with elevated
  461. # permissions.
  462. #
  463. # ``NAME``
  464. # is used to create domain-like identification for this component group.
  465. # By default used origin component group name.
  466. #
  467. # ``DISPLAY_NAME``
  468. # set to rewrite original name configured by
  469. # :command:`cpack_add_component_group` command.
  470. #
  471. # ``DESCRIPTION``
  472. # set to rewrite original description configured by
  473. # :command:`cpack_add_component_group` command.
  474. #
  475. # ``UPDATE_TEXT``
  476. # will be added to the component group description if this is an update to
  477. # the component group.
  478. #
  479. # ``VERSION``
  480. # is version of component group.
  481. # By default used :variable:`CPACK_PACKAGE_VERSION`.
  482. #
  483. # ``RELEASE_DATE``
  484. # keep empty to auto generate.
  485. #
  486. # ``SCRIPT``
  487. # is a relative or absolute path to operations script
  488. # for this component group.
  489. #
  490. # ``PRIORITY`` | ``SORTING_PRIORITY``
  491. # is priority of the component group in the tree.
  492. # The ``PRIORITY`` option is deprecated and will be removed in a future
  493. # version of CMake. Please use ``SORTING_PRIORITY`` option instead.
  494. #
  495. # ``DEPENDS`` | ``DEPENDENCIES``
  496. # list of dependency component or component group identifiers in
  497. # QtIFW_ style.
  498. #
  499. # ``AUTO_DEPEND_ON``
  500. # list of identifiers of component or component group in QtIFW_ style
  501. # that this component group has an automatic dependency on.
  502. #
  503. # ``LICENSES``
  504. # pair of <display_name> and <file_path> of license text for this
  505. # component group. You can specify more then one license.
  506. #
  507. # ``DEFAULT``
  508. # Possible values are: TRUE, FALSE, and SCRIPT.
  509. # Set to TRUE to preselect the group in the installer
  510. # (this takes effect only on groups that have no visible child components)
  511. # or to SCRIPT to resolved during runtime (don't forget add the file of
  512. # the script as a value of the ``SCRIPT`` option).
  513. #
  514. # ``USER_INTERFACES``
  515. # is a list of <file_path> ('.ui' files) representing pages to load.
  516. #
  517. # ``TRANSLATIONS``
  518. # is a list of <file_path> ('.qm' files) representing translations to load.
  519. #
  520. # ``REPLACES``
  521. # list of identifiers of component or component group to replace.
  522. #
  523. # ``CHECKABLE``
  524. # Possible values are: TRUE, FALSE.
  525. # Set to FALSE if you want to hide the checkbox for an item.
  526. # This is useful when only a few subcomponents should be selected
  527. # instead of all.
  528. #
  529. #
  530. # .. command:: cpack_ifw_add_repository
  531. #
  532. # Add QtIFW_ specific remote repository to binary installer.
  533. #
  534. # ::
  535. #
  536. # cpack_ifw_add_repository(<reponame> [DISABLED]
  537. # URL <url>
  538. # [USERNAME <username>]
  539. # [PASSWORD <password>]
  540. # [DISPLAY_NAME <display_name>])
  541. #
  542. # This command will also add the <reponame> repository
  543. # to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`.
  544. #
  545. # ``DISABLED``
  546. # if set, then the repository will be disabled by default.
  547. #
  548. # ``URL``
  549. # is points to a list of available components.
  550. #
  551. # ``USERNAME``
  552. # is used as user on a protected repository.
  553. #
  554. # ``PASSWORD``
  555. # is password to use on a protected repository.
  556. #
  557. # ``DISPLAY_NAME``
  558. # is string to display instead of the URL.
  559. #
  560. #
  561. # .. command:: cpack_ifw_update_repository
  562. #
  563. # Update QtIFW_ specific repository from remote repository.
  564. #
  565. # ::
  566. #
  567. # cpack_ifw_update_repository(<reponame>
  568. # [[ADD|REMOVE] URL <url>]|
  569. # [REPLACE OLD_URL <old_url> NEW_URL <new_url>]]
  570. # [USERNAME <username>]
  571. # [PASSWORD <password>]
  572. # [DISPLAY_NAME <display_name>])
  573. #
  574. # This command will also add the <reponame> repository
  575. # to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL`.
  576. #
  577. # ``URL``
  578. # is points to a list of available components.
  579. #
  580. # ``OLD_URL``
  581. # is points to a list that will replaced.
  582. #
  583. # ``NEW_URL``
  584. # is points to a list that will replace to.
  585. #
  586. # ``USERNAME``
  587. # is used as user on a protected repository.
  588. #
  589. # ``PASSWORD``
  590. # is password to use on a protected repository.
  591. #
  592. # ``DISPLAY_NAME``
  593. # is string to display instead of the URL.
  594. #
  595. #
  596. # .. command:: cpack_ifw_add_package_resources
  597. #
  598. # Add additional resources in the installer binary.
  599. #
  600. # ::
  601. #
  602. # cpack_ifw_add_package_resources(<file_path> <file_path> ...)
  603. #
  604. # This command will also add the specified files
  605. # to a variable :variable:`CPACK_IFW_PACKAGE_RESOURCES`.
  606. #
  607. #
  608. # Example usage
  609. # ^^^^^^^^^^^^^
  610. #
  611. # .. code-block:: cmake
  612. #
  613. # set(CPACK_PACKAGE_NAME "MyPackage")
  614. # set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MyPackage Installation Example")
  615. # set(CPACK_PACKAGE_VERSION "1.0.0") # Version of installer
  616. #
  617. # include(CPack)
  618. # include(CPackIFW)
  619. #
  620. # cpack_add_component(myapp
  621. # DISPLAY_NAME "MyApp"
  622. # DESCRIPTION "My Application") # Default description
  623. # cpack_ifw_configure_component(myapp
  624. # DESCRIPTION ru_RU "Мое Приложение" # Localized description
  625. # VERSION "1.2.3" # Version of component
  626. # SCRIPT "operations.qs")
  627. # cpack_add_component(mybigplugin
  628. # DISPLAY_NAME "MyBigPlugin"
  629. # DESCRIPTION "My Big Downloadable Plugin"
  630. # DOWNLOADED)
  631. # cpack_ifw_add_repository(myrepo
  632. # URL "http://example.com/ifw/repo/myapp"
  633. # DISPLAY_NAME "My Application Repository")
  634. #
  635. #
  636. # Online installer
  637. # ^^^^^^^^^^^^^^^^
  638. #
  639. # By default CPack IFW generator makes offline installer. This means that all
  640. # components will be packaged into a binary file.
  641. #
  642. # To make a component downloaded, you must set the ``DOWNLOADED`` option in
  643. # :command:`cpack_add_component`.
  644. #
  645. # Then you would use the command :command:`cpack_configure_downloads`.
  646. # If you set ``ALL`` option all components will be downloaded.
  647. #
  648. # You also can use command :command:`cpack_ifw_add_repository` and
  649. # variable :variable:`CPACK_IFW_DOWNLOAD_ALL` for more specific configuration.
  650. #
  651. # CPack IFW generator creates "repository" dir in current binary dir. You
  652. # would copy content of this dir to specified ``site`` (``url``).
  653. #
  654. # See Also
  655. # ^^^^^^^^
  656. #
  657. # Qt Installer Framework Manual:
  658. #
  659. # * Index page:
  660. # http://doc.qt.io/qtinstallerframework/index.html
  661. #
  662. # * Component Scripting:
  663. # http://doc.qt.io/qtinstallerframework/scripting.html
  664. #
  665. # * Predefined Variables:
  666. # http://doc.qt.io/qtinstallerframework/scripting.html#predefined-variables
  667. #
  668. # * Promoting Updates:
  669. # http://doc.qt.io/qtinstallerframework/ifw-updates.html
  670. #
  671. # Download Qt Installer Framework for you platform from Qt site:
  672. # http://download.qt.io/official_releases/qt-installer-framework
  673. #
  674. #=============================================================================
  675. # Search Qt Installer Framework tools
  676. #=============================================================================
  677. # Default path
  678. foreach(_CPACK_IFW_PATH_VAR "CPACK_IFW_ROOT" "QTIFWDIR" "QTDIR")
  679. if(DEFINED ${_CPACK_IFW_PATH_VAR}
  680. AND NOT "${${_CPACK_IFW_PATH_VAR}}" STREQUAL "")
  681. list(APPEND _CPACK_IFW_PATHS "${${_CPACK_IFW_PATH_VAR}}")
  682. endif()
  683. if(NOT "$ENV{${_CPACK_IFW_PATH_VAR}}" STREQUAL "")
  684. list(APPEND _CPACK_IFW_PATHS "$ENV{${_CPACK_IFW_PATH_VAR}}")
  685. endif()
  686. endforeach()
  687. if(WIN32)
  688. list(APPEND _CPACK_IFW_PATHS
  689. "$ENV{HOMEDRIVE}/Qt"
  690. "C:/Qt")
  691. else()
  692. list(APPEND _CPACK_IFW_PATHS
  693. "$ENV{HOME}/Qt"
  694. "/opt/Qt")
  695. endif()
  696. list(REMOVE_DUPLICATES _CPACK_IFW_PATHS)
  697. set(_CPACK_IFW_PREFIXES
  698. # QtSDK
  699. "Tools/QtInstallerFramework/"
  700. # Second branch
  701. "QtIFW"
  702. # First branch
  703. "QtIFW-")
  704. set(_CPACK_IFW_VERSIONS
  705. "3.1"
  706. "3.1.0"
  707. "3.0"
  708. "3.0.0"
  709. "2.3"
  710. "2.3.0"
  711. "2.2"
  712. "2.2.0"
  713. "2.1"
  714. "2.1.0"
  715. "2.0"
  716. "2.0.5"
  717. "2.0.3"
  718. "2.0.2"
  719. "2.0.1"
  720. "2.0.0"
  721. "1.6"
  722. "1.6.0"
  723. "1.5"
  724. "1.5.0"
  725. "1.4"
  726. "1.4.0"
  727. "1.3"
  728. "1.3.0")
  729. set(_CPACK_IFW_SUFFIXES "bin")
  730. foreach(_CPACK_IFW_PREFIX ${_CPACK_IFW_PREFIXES})
  731. foreach(_CPACK_IFW_VERSION ${_CPACK_IFW_VERSIONS})
  732. list(APPEND
  733. _CPACK_IFW_SUFFIXES "${_CPACK_IFW_PREFIX}${_CPACK_IFW_VERSION}/bin")
  734. endforeach()
  735. endforeach()
  736. # Look for 'binarycreator'
  737. find_program(CPACK_IFW_BINARYCREATOR_EXECUTABLE
  738. NAMES binarycreator
  739. PATHS ${_CPACK_IFW_PATHS}
  740. PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
  741. DOC "QtIFW binarycreator command line client")
  742. mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE)
  743. # Look for 'repogen'
  744. find_program(CPACK_IFW_REPOGEN_EXECUTABLE
  745. NAMES repogen
  746. PATHS ${_CPACK_IFW_PATHS}
  747. PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
  748. DOC "QtIFW repogen command line client"
  749. )
  750. mark_as_advanced(CPACK_IFW_REPOGEN_EXECUTABLE)
  751. # Look for 'installerbase'
  752. find_program(CPACK_IFW_INSTALLERBASE_EXECUTABLE
  753. NAMES installerbase
  754. PATHS ${_CPACK_IFW_PATHS}
  755. PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
  756. DOC "QtIFW installer executable base"
  757. )
  758. mark_as_advanced(CPACK_IFW_INSTALLERBASE_EXECUTABLE)
  759. # Look for 'devtool' (appeared in the second branch)
  760. find_program(CPACK_IFW_DEVTOOL_EXECUTABLE
  761. NAMES devtool
  762. PATHS ${_CPACK_IFW_PATHS}
  763. PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES}
  764. DOC "QtIFW devtool command line client"
  765. )
  766. mark_as_advanced(CPACK_IFW_DEVTOOL_EXECUTABLE)
  767. #
  768. ## Next code is included only once
  769. #
  770. if(NOT CPackIFW_CMake_INCLUDED)
  771. set(CPackIFW_CMake_INCLUDED 1)
  772. #=============================================================================
  773. # Framework version
  774. #=============================================================================
  775. set(CPACK_IFW_FRAMEWORK_VERSION_FORCED ""
  776. CACHE STRING "The forced version of used QtIFW tools")
  777. mark_as_advanced(CPACK_IFW_FRAMEWORK_VERSION_FORCED)
  778. set(CPACK_IFW_FRAMEWORK_VERSION_TIMEOUT 1
  779. CACHE STRING "The timeout to return QtIFW framework version string from \"installerbase\" executable")
  780. mark_as_advanced(CPACK_IFW_FRAMEWORK_VERSION_TIMEOUT)
  781. if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND NOT CPACK_IFW_FRAMEWORK_VERSION_FORCED)
  782. set(CPACK_IFW_FRAMEWORK_VERSION)
  783. # Invoke version from "installerbase" executable
  784. foreach(_ifw_version_argument --framework-version --version)
  785. if(NOT CPACK_IFW_FRAMEWORK_VERSION)
  786. execute_process(COMMAND
  787. "${CPACK_IFW_INSTALLERBASE_EXECUTABLE}" ${_ifw_version_argument}
  788. TIMEOUT ${CPACK_IFW_FRAMEWORK_VERSION_TIMEOUT}
  789. RESULT_VARIABLE CPACK_IFW_FRAMEWORK_VERSION_RESULT
  790. OUTPUT_VARIABLE CPACK_IFW_FRAMEWORK_VERSION_OUTPUT
  791. OUTPUT_STRIP_TRAILING_WHITESPACE
  792. ENCODING UTF8)
  793. if(NOT CPACK_IFW_FRAMEWORK_VERSION_RESULT AND CPACK_IFW_FRAMEWORK_VERSION_OUTPUT)
  794. string(REGEX MATCH "[0-9]+(\\.[0-9]+)*"
  795. CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_FRAMEWORK_VERSION_OUTPUT}")
  796. if(CPACK_IFW_FRAMEWORK_VERSION)
  797. if("${_ifw_version_argument}" STREQUAL "--framework-version")
  798. set(CPACK_IFW_FRAMEWORK_VERSION_SOURCE "INSTALLERBASE_FRAMEWORK_VERSION")
  799. elseif("${_ifw_version_argument}" STREQUAL "--version")
  800. set(CPACK_IFW_FRAMEWORK_VERSION_SOURCE "INSTALLERBASE_FRAMEWORK_VERSION")
  801. endif()
  802. endif()
  803. endif()
  804. endif()
  805. endforeach()
  806. # Finally try to get version from executable path
  807. if(NOT CPACK_IFW_FRAMEWORK_VERSION)
  808. string(REGEX MATCH "[0-9]+(\\.[0-9]+)*"
  809. CPACK_IFW_FRAMEWORK_VERSION "${CPACK_IFW_INSTALLERBASE_EXECUTABLE}")
  810. if(CPACK_IFW_FRAMEWORK_VERSION)
  811. set(CPACK_IFW_FRAMEWORK_VERSION_SOURCE "INSTALLERBASE_PATH")
  812. endif()
  813. endif()
  814. elseif(CPACK_IFW_FRAMEWORK_VERSION_FORCED)
  815. set(CPACK_IFW_FRAMEWORK_VERSION ${CPACK_IFW_FRAMEWORK_VERSION_FORCED})
  816. set(CPACK_IFW_FRAMEWORK_VERSION_SOURCE "FORCED")
  817. endif()
  818. if(CPACK_IFW_VERBOSE)
  819. if(CPACK_IFW_FRAMEWORK_VERSION AND CPACK_IFW_FRAMEWORK_VERSION_FORCED)
  820. message(STATUS "Found QtIFW ${CPACK_IFW_FRAMEWORK_VERSION} (forced) version")
  821. elseif(CPACK_IFW_FRAMEWORK_VERSION)
  822. message(STATUS "Found QtIFW ${CPACK_IFW_FRAMEWORK_VERSION} version")
  823. endif()
  824. endif()
  825. if(CPACK_IFW_INSTALLERBASE_EXECUTABLE AND NOT CPACK_IFW_FRAMEWORK_VERSION)
  826. message(WARNING "Could not detect QtIFW tools version. Set used version to variable \"CPACK_IFW_FRAMEWORK_VERSION_FORCED\" manually.")
  827. endif()
  828. #=============================================================================
  829. # Macro definition
  830. #=============================================================================
  831. # Macro definition based on CPackComponent
  832. if(NOT CPackComponent_CMake_INCLUDED)
  833. include(CPackComponent)
  834. endif()
  835. # Resolve full filename for script file
  836. macro(_cpack_ifw_resolve_script _variable)
  837. set(_ifw_script_macro ${_variable})
  838. set(_ifw_script_file ${${_ifw_script_macro}})
  839. if(DEFINED ${_ifw_script_macro})
  840. get_filename_component(${_ifw_script_macro} ${_ifw_script_file} ABSOLUTE)
  841. set(_ifw_script_file ${${_ifw_script_macro}})
  842. if(NOT EXISTS ${_ifw_script_file})
  843. message(WARNING "CPack IFW: script file \"${_ifw_script_file}\" is not exists")
  844. set(${_ifw_script_macro})
  845. endif()
  846. endif()
  847. endmacro()
  848. # Resolve full path to license file
  849. macro(_cpack_ifw_resolve_lisenses _variable)
  850. if(${_variable})
  851. set(_ifw_license_file FALSE)
  852. set(_ifw_licenses_fix)
  853. foreach(_ifw_licenses_arg ${${_variable}})
  854. if(_ifw_license_file)
  855. get_filename_component(_ifw_licenses_arg "${_ifw_licenses_arg}" ABSOLUTE)
  856. set(_ifw_license_file FALSE)
  857. else()
  858. set(_ifw_license_file TRUE)
  859. endif()
  860. list(APPEND _ifw_licenses_fix "${_ifw_licenses_arg}")
  861. endforeach(_ifw_licenses_arg)
  862. set(${_variable} "${_ifw_licenses_fix}")
  863. endif()
  864. endmacro()
  865. # Resolve full path to a list of provided files
  866. macro(_cpack_ifw_resolve_file_list _variable)
  867. if(${_variable})
  868. set(_ifw_list_fix)
  869. foreach(_ifw_file_arg ${${_variable}})
  870. get_filename_component(_ifw_file_arg "${_ifw_file_arg}" ABSOLUTE)
  871. if(EXISTS ${_ifw_file_arg})
  872. list(APPEND _ifw_list_fix "${_ifw_file_arg}")
  873. else()
  874. message(WARNING "CPack IFW: page file \"${_ifw_file_arg}\" does not exist. Skipping")
  875. endif()
  876. endforeach(_ifw_file_arg)
  877. set(${_variable} "${_ifw_list_fix}")
  878. endif()
  879. endmacro()
  880. # Macro for configure component
  881. macro(cpack_ifw_configure_component compname)
  882. string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME)
  883. set(_IFW_OPT COMMON ESSENTIAL VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
  884. set(_IFW_ARGS NAME VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT CHECKABLE)
  885. set(_IFW_MULTI_ARGS DISPLAY_NAME DESCRIPTION DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS REPLACES)
  886. cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
  887. _cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_SCRIPT)
  888. _cpack_ifw_resolve_lisenses(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_LICENSES)
  889. _cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_USER_INTERFACES)
  890. _cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_TRANSLATIONS)
  891. set(_CPACK_IFWCOMP_STR "\n# Configuration for IFW component \"${compname}\"\n")
  892. foreach(_IFW_ARG_NAME ${_IFW_OPT})
  893. cpack_append_option_set_command(
  894. CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_${_IFW_ARG_NAME}
  895. _CPACK_IFWCOMP_STR)
  896. endforeach()
  897. foreach(_IFW_ARG_NAME ${_IFW_ARGS})
  898. cpack_append_string_variable_set_command(
  899. CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_${_IFW_ARG_NAME}
  900. _CPACK_IFWCOMP_STR)
  901. endforeach()
  902. foreach(_IFW_ARG_NAME ${_IFW_MULTI_ARGS})
  903. cpack_append_list_variable_set_command(
  904. CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_${_IFW_ARG_NAME}
  905. _CPACK_IFWCOMP_STR)
  906. endforeach()
  907. if(CPack_CMake_INCLUDED)
  908. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWCOMP_STR}")
  909. endif()
  910. endmacro()
  911. # Macro for configure group
  912. macro(cpack_ifw_configure_component_group grpname)
  913. string(TOUPPER ${grpname} _CPACK_IFWGRP_UNAME)
  914. set(_IFW_OPT VIRTUAL FORCED_INSTALLATION REQUIRES_ADMIN_RIGHTS)
  915. set(_IFW_ARGS NAME VERSION RELEASE_DATE SCRIPT PRIORITY SORTING_PRIORITY UPDATE_TEXT DEFAULT CHECKABLE)
  916. set(_IFW_MULTI_ARGS DISPLAY_NAME DESCRIPTION DEPENDS DEPENDENCIES AUTO_DEPEND_ON LICENSES USER_INTERFACES TRANSLATIONS REPLACES)
  917. cmake_parse_arguments(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
  918. _cpack_ifw_resolve_script(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_SCRIPT)
  919. _cpack_ifw_resolve_lisenses(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_LICENSES)
  920. _cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_USER_INTERFACES)
  921. _cpack_ifw_resolve_file_list(CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_TRANSLATIONS)
  922. set(_CPACK_IFWGRP_STR "\n# Configuration for IFW component group \"${grpname}\"\n")
  923. foreach(_IFW_ARG_NAME ${_IFW_ARGS})
  924. cpack_append_string_variable_set_command(
  925. CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_${_IFW_ARG_NAME}
  926. _CPACK_IFWGRP_STR)
  927. endforeach()
  928. foreach(_IFW_ARG_NAME ${_IFW_MULTI_ARGS})
  929. cpack_append_list_variable_set_command(
  930. CPACK_IFW_COMPONENT_GROUP_${_CPACK_IFWGRP_UNAME}_${_IFW_ARG_NAME}
  931. _CPACK_IFWGRP_STR)
  932. endforeach()
  933. if(CPack_CMake_INCLUDED)
  934. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWGRP_STR}")
  935. endif()
  936. endmacro()
  937. # Macro for adding repository
  938. macro(cpack_ifw_add_repository reponame)
  939. string(TOUPPER ${reponame} _CPACK_IFWREPO_UNAME)
  940. set(_IFW_OPT DISABLED)
  941. set(_IFW_ARGS URL USERNAME PASSWORD DISPLAY_NAME)
  942. set(_IFW_MULTI_ARGS)
  943. cmake_parse_arguments(CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
  944. set(_CPACK_IFWREPO_STR "\n# Configuration for IFW repository \"${reponame}\"\n")
  945. foreach(_IFW_ARG_NAME ${_IFW_OPT})
  946. cpack_append_option_set_command(
  947. CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
  948. _CPACK_IFWREPO_STR)
  949. endforeach()
  950. foreach(_IFW_ARG_NAME ${_IFW_ARGS})
  951. cpack_append_string_variable_set_command(
  952. CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
  953. _CPACK_IFWREPO_STR)
  954. endforeach()
  955. foreach(_IFW_ARG_NAME ${_IFW_MULTI_ARGS})
  956. cpack_append_variable_set_command(
  957. CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
  958. _CPACK_IFWREPO_STR)
  959. endforeach()
  960. list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})
  961. string(APPEND _CPACK_IFWREPO_STR "list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})\n")
  962. if(CPack_CMake_INCLUDED)
  963. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWREPO_STR}")
  964. endif()
  965. endmacro()
  966. # Macro for updating repository
  967. macro(cpack_ifw_update_repository reponame)
  968. string(TOUPPER ${reponame} _CPACK_IFWREPO_UNAME)
  969. set(_IFW_OPT ADD REMOVE REPLACE DISABLED)
  970. set(_IFW_ARGS URL OLD_URL NEW_URL USERNAME PASSWORD DISPLAY_NAME)
  971. set(_IFW_MULTI_ARGS)
  972. cmake_parse_arguments(CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
  973. set(_CPACK_IFWREPO_STR "\n# Configuration for IFW repository \"${reponame}\" update\n")
  974. foreach(_IFW_ARG_NAME ${_IFW_OPT})
  975. cpack_append_option_set_command(
  976. CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
  977. _CPACK_IFWREPO_STR)
  978. endforeach()
  979. foreach(_IFW_ARG_NAME ${_IFW_ARGS})
  980. cpack_append_string_variable_set_command(
  981. CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
  982. _CPACK_IFWREPO_STR)
  983. endforeach()
  984. foreach(_IFW_ARG_NAME ${_IFW_MULTI_ARGS})
  985. cpack_append_variable_set_command(
  986. CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME}
  987. _CPACK_IFWREPO_STR)
  988. endforeach()
  989. if(CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_ADD
  990. OR CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_REMOVE
  991. OR CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_REPLACE)
  992. list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})
  993. string(APPEND _CPACK_IFWREPO_STR "list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})\n")
  994. else()
  995. set(_CPACK_IFWREPO_STR)
  996. endif()
  997. if(CPack_CMake_INCLUDED AND _CPACK_IFWREPO_STR)
  998. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWREPO_STR}")
  999. endif()
  1000. endmacro()
  1001. # Macro for adding resources
  1002. macro(cpack_ifw_add_package_resources)
  1003. set(_CPACK_IFW_PACKAGE_RESOURCES ${ARGV})
  1004. _cpack_ifw_resolve_file_list(_CPACK_IFW_PACKAGE_RESOURCES)
  1005. list(APPEND CPACK_IFW_PACKAGE_RESOURCES ${_CPACK_IFW_PACKAGE_RESOURCES})
  1006. set(_CPACK_IFWQRC_STR "list(APPEND CPACK_IFW_PACKAGE_RESOURCES \"${_CPACK_IFW_PACKAGE_RESOURCES}\")\n")
  1007. if(CPack_CMake_INCLUDED)
  1008. file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWQRC_STR}")
  1009. endif()
  1010. endmacro()
  1011. # Resolve package control script
  1012. _cpack_ifw_resolve_script(CPACK_IFW_PACKAGE_CONTROL_SCRIPT)
  1013. endif() # NOT CPackIFW_CMake_INCLUDED