Skip to content

Commit

Permalink
vcpkg: Support Windows and arm64 (#478)
Browse files Browse the repository at this point in the history
* Support arm64 default vcpkg triplet

* Add default Windows release triplet support
  • Loading branch information
ekilmer authored Feb 2, 2021
1 parent ab27539 commit 671760c
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions cmake/vcpkg_helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,24 @@ if (NOT USE_SYSTEM_DEPENDENCIES)

# Set default triplet to Release VCPKG build unless we can't find it
if (NOT DEFINED VCPKG_TARGET_TRIPLET)
set(_project_arch "x64")
if (UNIX)
execute_process(COMMAND uname -m
OUTPUT_VARIABLE _SYSTEM_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
message(WARNING "No detection of architecture for this platform. Assuming x64")
endif()
if (_SYSTEM_ARCH MATCHES "^[Aa][Aa][Rr][Cc][Hh]64$")
set(_project_arch "arm64")
endif()

if (APPLE)
set(_project_vcpkg_triplet "x64-osx-rel")
set(_project_vcpkg_triplet "${_project_arch}-osx-rel")
elseif(UNIX)
set(_project_vcpkg_triplet "x64-linux-rel")
set(_project_vcpkg_triplet "${_project_arch}-linux-rel")
elseif(WIN32)
set(_project_vcpkg_triplet "${_project_arch}-windows-static-md-rel")
else()
message(FATAL_ERROR "Could not detect default release triplet")
endif()
Expand Down

0 comments on commit 671760c

Please sign in to comment.