File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,14 @@ if (WIN32)
2525 file (GLOB _WIX_DIRECTORIES_X64 "C:/Program Files/WiX Toolset*" )
2626 file (GLOB _WIX_DIRECTORIES_X86 "C:/Program Files (x86)/WiX Toolset*" )
2727
28- # The environment variable WIX can end with a '\' character. This backslash character is escaping the next character which is the list separator ';'.
29- set (_WIX_ENV_PATH "$ENV{WIX} " )
30- string (REPLACE "\\ " "/" _WIX_ENV_PATH ${_WIX_ENV_PATH} )
28+ # Read WIX environment variable if defined to an existing path
29+ set (_WIX_ENV_PATH "" ) # Set to an empty value by default
30+ if (EXISTS "$ENV{WIX} " )
31+ # The environment variable WIX can end with a '\' character.
32+ # This backslash character is escaping the next character which is the list separator ';'.
33+ set (_WIX_ENV_PATH "$ENV{WIX} " )
34+ string (REPLACE "\\ " "/" _WIX_ENV_PATH ${_WIX_ENV_PATH} )
35+ endif (EXISTS "$ENV{WIX} " )
3136
3237 # Define know directory locations where it could be installed.
3338 set (_WIX_ROOT_PATHS
You can’t perform that action at this time.
0 commit comments