CPackComponent.cmake 20 KB

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