diff options
Diffstat (limited to 'Tests/VSMidl')
-rw-r--r-- | Tests/VSMidl/CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Tests/VSMidl/CMakeLists.txt b/Tests/VSMidl/CMakeLists.txt index 7dd2b4d..432506c 100644 --- a/Tests/VSMidl/CMakeLists.txt +++ b/Tests/VSMidl/CMakeLists.txt @@ -27,12 +27,15 @@ if(NOT DEFINED HOME) if(NOT HOME AND WIN32) # Try for USERPROFILE as HOME equivalent: string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}") + endif() - # But just use root of SystemDrive if USERPROFILE contains any spaces: - # (Default on XP and earlier...) - if(HOME MATCHES " ") - string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}") - endif() + # But just use root of SystemDrive if HOME contains any spaces: + # (Default on XP and earlier...) + if(HOME MATCHES " " AND WIN32) + string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}") + endif() + if(HOME MATCHES " ") + set(HOME "") endif() endif() message(STATUS "HOME='${HOME}'") |