CPackWIX.cmake 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ##section Variables specific to CPack WiX generator
  2. ##end
  3. ##module
  4. # - CPack WiX generator specific options
  5. #
  6. # The following variables are specific to the installers built
  7. # on Windows using WiX.
  8. ##end
  9. ##variable
  10. # CPACK_WIX_UPGRADE_GUID - Upgrade GUID (Product/@UpgradeCode)
  11. #
  12. # Will be automatically generated unless explicitly provided.
  13. #
  14. # It should be explicitly set to a constant generated
  15. # gloabally unique identifier (GUID) to allow your installers
  16. # to replace existing installations that use the same GUID.
  17. #
  18. # You may for example explicitly set this variable in
  19. # your CMakeLists.txt to the value that has been generated per default.
  20. # You should not use GUIDs that you did not generate yourself or which may
  21. # belong to other projects.
  22. #
  23. # A GUID shall have the following fixed length syntax:
  24. # XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  25. # (each X represents an uppercase hexadecimal digit)
  26. ##end
  27. ##variable
  28. # CPACK_WIX_PRODUCT_GUID - Product GUID (Product/@Id)
  29. #
  30. # Will be automatically generated unless explicitly provided.
  31. #
  32. # If explicitly provided this will set the Product Id of your installer.
  33. #
  34. # The installer will abort if it detects a pre-existing installation that uses
  35. # the same GUID.
  36. #
  37. # The GUID shall use the syntax described for CPACK_WIX_UPGRADE_GUID.
  38. ##end
  39. ##variable
  40. # CPACK_WIX_LICENSE_RTF - RTF License File
  41. #
  42. # If CPACK_RESOURCE_FILE_LICENSE has an .rtf extension
  43. # it is used as-is.
  44. #
  45. # If CPACK_RESOURCE_FILE_LICENSE has an .txt extension
  46. # it is implicitly converted to RTF by the WiX Generator.
  47. #
  48. # With CPACK_WIX_LICENSE_RTF you can override the license file used
  49. # by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE
  50. # is in an unsupported format or the .txt -> .rtf
  51. # conversion does not work as expected.
  52. #
  53. ##end
  54. #
  55. ##variable
  56. # CPACK_WIX_PRODUCT_ICON - The Icon shown next to the program name in Add/Remove programs.
  57. #
  58. # If set, this icon is used in place of the default icon.
  59. #
  60. ##end
  61. #
  62. ##variable
  63. # CPACK_WIX_UI_BANNER - The bitmap will appear at the top of all installer pages other than the welcome and completion dialogs.
  64. #
  65. # If set, this image will replace the default banner image.
  66. #
  67. # This image must be 493 by 58 pixels.
  68. #
  69. ##end
  70. #
  71. ##variable
  72. # CPACK_WIX_UI_DIALOG - Background bitmap used on the welcome and completion dialogs.
  73. #
  74. # If this variable is set, the installer will replace the default dialog image.
  75. #
  76. # This image must be 493 by 312 pixels.
  77. #
  78. ##end
  79. #=============================================================================
  80. # Copyright 2012 Kitware, Inc.
  81. #
  82. # Distributed under the OSI-approved BSD License (the "License");
  83. # see accompanying file Copyright.txt for details.
  84. #
  85. # This software is distributed WITHOUT ANY WARRANTY; without even the
  86. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  87. # See the License for more information.
  88. #=============================================================================
  89. # (To distribute this file outside of CMake, substitute the full
  90. # License text for the above reference.)
  91. if(NOT CPACK_WIX_ROOT)
  92. file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
  93. endif()
  94. find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
  95. PATHS "${CPACK_WIX_ROOT}/bin")
  96. if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
  97. message(FATAL_ERROR "Could not find the WiX candle executable.")
  98. endif()
  99. find_program(CPACK_WIX_LIGHT_EXECUTABLE light
  100. PATHS "${CPACK_WIX_ROOT}/bin")
  101. if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
  102. message(FATAL_ERROR "Could not find the WiX light executable.")
  103. endif()