Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cmake/GetTriplet.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
function(get_host_triplet triplet)
set(host_arch ${CMAKE_SYSTEM_PROCESSOR})
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" host_arch)
if(host_arch STREQUAL "x86")
set(host_arch "i686")
endif()
if(host_arch STREQUAL "amd64")
elseif(host_arch STREQUAL "amd64")
set(host_arch "x86_64")
elseif(host_arch STREQUAL "arm64")
set(host_arch "aarch64")
endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
Expand All @@ -28,12 +29,13 @@ function(get_host_triplet triplet)
endfunction()

function(get_build_triplet triplet)
set(host_arch ${CMAKE_HOST_SYSTEM_PROCESSOR})
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}" host_arch)
if(host_arch STREQUAL "x86")
set(host_arch "i686")
endif()
if(host_arch STREQUAL "amd64")
elseif(host_arch STREQUAL "amd64")
set(host_arch "x86_64")
elseif(host_arch STREQUAL "arm64")
set(host_arch "aarch64")
endif()

if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
Expand Down