Debian Codegraph @

Modules/Internal/CPack/CPackWIX.cmake

raw
1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 # file LICENSE.rst or https://cmake.org/licensing for details.
3
4 if(NOT CPACK_WIX_ROOT)
5 string(REPLACE "\\" "/" CPACK_WIX_ROOT "$ENV{WIX}")
6 endif()
7
8 if(CPACK_WIX_VERSION VERSION_GREATER_EQUAL 4)
9 find_program(CPACK_WIX_EXECUTABLE NAMES wix
10 PATHS "${CPACK_WIX_ROOT}" PATH_SUFFIXES "bin")
11 if(NOT CPACK_WIX_EXECUTABLE)
12 message(FATAL_ERROR "Could not find the 'wix' executable.")
13 endif()
14
15 if(NOT DEFINED CPACK_WIX_INSTALL_SCOPE)
16 set(CPACK_WIX_INSTALL_SCOPE "perMachine")
17 endif()
18 else()
19 find_program(CPACK_WIX_CANDLE_EXECUTABLE candle
20 PATHS "${CPACK_WIX_ROOT}" PATH_SUFFIXES "bin")
21 if(NOT CPACK_WIX_CANDLE_EXECUTABLE)
22 message(FATAL_ERROR "Could not find the WiX candle executable.")
23 endif()
24
25 find_program(CPACK_WIX_LIGHT_EXECUTABLE light
26 PATHS "${CPACK_WIX_ROOT}" PATH_SUFFIXES "bin")
27 if(NOT CPACK_WIX_LIGHT_EXECUTABLE)
28 message(FATAL_ERROR "Could not find the WiX light executable.")
29 endif()
30
31 if(NOT DEFINED CPACK_WIX_INSTALL_SCOPE)
32 set(CPACK_WIX_INSTALL_SCOPE "NONE")
33 endif()
34 endif()