build: adjust cmake file for auto settings depends folder on m1 systems (#4669)

This commit is contained in:
PastaPastaPasta 2022-01-20 23:23:12 +07:00 committed by GitHub
parent ac1346278c
commit 4f3c2492eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,12 @@ include_directories(
if(UNIX AND NOT APPLE)
set(DEPENDS_PREFIX depends/x86_64-pc-linux-gnu)
elseif(APPLE)
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
if( ${ARCHITECTURE} STREQUAL "arm64" )
set(DEPENDS_PREFIX depends/aarch64-apple-darwin21.2.0)
else()
set(DEPENDS_PREFIX depends/x86_64-apple-darwin19)
endif()
elseif(WIN32)
set(DEPENDS_PREFIX depends/x86_64-w64-mingw32)
endif()