CPackWIX.cmake 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. ##end
  53. #=============================================================================
  54. # Copyright 2012 Kitware, Inc.
  55. #
  56. # Distributed under the OSI-approved BSD License (the "License");
  57. # see accompanying file Copyright.txt for details.
  58. #
  59. # This software is distributed WITHOUT ANY WARRANTY; without even the
  60. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  61. # See the License for more information.
  62. #=============================================================================
  63. # (To distribute this file outside of CMake, substitute the full
  64. # License text for the above reference.)
  65. if(NOT CPACK_WIX_ROOT)
  66. file(TO_CMAKE_PATH "$ENV{WIX}" CPACK_WIX_ROOT)
  67. endif()
  68. find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
  69. PATHS "${CPACK_WIX_ROOT}/bin")
  70. if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
  71. message(FATAL_ERROR "Could not find the WiX candle executable.")
  72. endif()
  73. find_program(CPACK_WIX_LIGHT_EXECUTABLE light
  74. PATHS "${CPACK_WIX_ROOT}/bin")
  75. if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
  76. message(FATAL_ERROR "Could not find the WiX light executable.")
  77. endif()