mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 12:21:51 +08:00
Improve functions that detect ProgramFiles in CMake
This commit is contained in:
parent
95a9a98ede
commit
beb1250fe4
@ -1,7 +1,10 @@
|
||||
function(vcpkg_get_program_files_32_bit ret)
|
||||
if(DEFINED ENV{ProgramFiles\(X86\)})
|
||||
set(${ret} $ENV{ProgramFiles\(X86\)} PARENT_SCOPE)
|
||||
else()
|
||||
set(${ret} $ENV{PROGRAMFILES} PARENT_SCOPE)
|
||||
|
||||
set(ret_temp $ENV{ProgramFiles\(X86\)})
|
||||
if (NOT DEFINED ret_temp)
|
||||
set(ret_temp $ENV{PROGRAMFILES})
|
||||
endif()
|
||||
|
||||
set(${ret} ${ret_temp} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
@ -1,7 +1,10 @@
|
||||
function(vcpkg_get_program_files_platform_bitness ret)
|
||||
if(DEFINED ENV{ProgramW6432})
|
||||
set(${ret} $ENV{ProgramW6432} PARENT_SCOPE)
|
||||
else()
|
||||
set(${ret} $ENV{PROGRAMFILES} PARENT_SCOPE)
|
||||
|
||||
set(ret_temp $ENV{ProgramW6432})
|
||||
if (NOT DEFINED ret_temp)
|
||||
set(ret_temp $ENV{PROGRAMFILES})
|
||||
endif()
|
||||
|
||||
set(${ret} ${ret_temp} PARENT_SCOPE)
|
||||
|
||||
endfunction()
|
Loading…
x
Reference in New Issue
Block a user