File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,24 @@ if (NOT USE_SYSTEM_DEPENDENCIES)
1919
2020 # Set default triplet to Release VCPKG build unless we can't find it
2121 if (NOT DEFINED VCPKG_TARGET_TRIPLET)
22+ set (_project_arch "x64" )
23+ if (UNIX )
24+ execute_process (COMMAND uname -m
25+ OUTPUT_VARIABLE _SYSTEM_ARCH
26+ OUTPUT_STRIP_TRAILING_WHITESPACE)
27+ else ()
28+ message (WARNING "No detection of architecture for this platform. Assuming x64" )
29+ endif ()
30+ if (_SYSTEM_ARCH MATCHES "^[Aa][Aa][Rr][Cc][Hh]64$" )
31+ set (_project_arch "arm64" )
32+ endif ()
33+
2234 if (APPLE )
23- set (_project_vcpkg_triplet "x64 -osx-rel" )
35+ set (_project_vcpkg_triplet "${_project_arch} -osx-rel" )
2436 elseif (UNIX )
25- set (_project_vcpkg_triplet "x64-linux-rel" )
37+ set (_project_vcpkg_triplet "${_project_arch} -linux-rel" )
38+ elseif (WIN32 )
39+ set (_project_vcpkg_triplet "${_project_arch} -windows-static-md-rel" )
2640 else ()
2741 message (FATAL_ERROR "Could not detect default release triplet" )
2842 endif ()
You can’t perform that action at this time.
0 commit comments