mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-29 11:41:36 +08:00
0e1dc12185
* [rollup:2021-07-16 1/7] PR #18201 (@JackBoosY) [vcpkg-cmake] Add check for unused cmake variables * [rollup:2021-07-16 2/7] PR #18397 (@strega-nil) [vcpkg_list] add new function * [rollup:2021-07-16 3/7] PR #18782 (@strega-nil) [scripts-audit] vcpkg_build_ninja * [rollup:2021-07-16 4/7] PR #18784 (@strega-nil) [scripts-audit] vcpkg_minimum_required * [rollup:2021-07-16 5/7] PR #18785 (@strega-nil) [scripts-audit] vcpkg_replace_string * [rollup:2021-07-16 6/7] PR #18786 (@strega-nil) [scripts-audit] windows scripts * [rollup:2021-07-16 7/7] PR #18945 (@strega-nil) [many ports] remove deprecated vcpkg_check_features call [1/5] Co-authored-by: nicole mazzuca <mazzucan@outlook.com> Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
21 lines
547 B
CMake
21 lines
547 B
CMake
#[===[.md:
|
|
# vcpkg_get_program_files_platform_bitness
|
|
|
|
Get the Program Files directory of the current platform's bitness:
|
|
either `$ENV{ProgramW6432}` on 64-bit windows,
|
|
or `$ENV{PROGRAMFILES}` on 32-bit windows.
|
|
|
|
## Usage:
|
|
```cmake
|
|
vcpkg_get_program_files_platform_bitness(<variable>)
|
|
```
|
|
#]===]
|
|
|
|
function(vcpkg_get_program_files_platform_bitness out_var)
|
|
if(DEFINED ENV{ProgramW6432})
|
|
set("${out_var}" "$ENV{ProgramW6432}" PARENT_SCOPE)
|
|
else()
|
|
set("${out_var}" "$ENV{PROGRAMFILES}" PARENT_SCOPE)
|
|
endif()
|
|
endfunction()
|