Fork CMakeRust and add the aarch64-apple-darwin fix to it
This commit is contained in:
committed by
Dustin J. Mitchell
parent
7492fc48bb
commit
41608dc35f
@@ -10,7 +10,7 @@ function(cargo_build)
|
||||
else()
|
||||
set(LIB_TARGET "i686-pc-windows-msvc")
|
||||
endif()
|
||||
elseif(ANDROID)
|
||||
elseif(ANDROID)
|
||||
if(ANDROID_SYSROOT_ABI STREQUAL "x86")
|
||||
set(LIB_TARGET "i686-linux-android")
|
||||
elseif(ANDROID_SYSROOT_ABI STREQUAL "x86_64")
|
||||
@@ -21,11 +21,17 @@ function(cargo_build)
|
||||
set(LIB_TARGET "aarch64-linux-android")
|
||||
endif()
|
||||
elseif(IOS)
|
||||
set(LIB_TARGET "universal")
|
||||
set(LIB_TARGET "universal")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||||
set(LIB_TARGET "x86_64-apple-darwin")
|
||||
else()
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL arm64)
|
||||
set(LIB_TARGET "aarch64-apple-darwin")
|
||||
else()
|
||||
set(LIB_TARGET "x86_64-apple-darwin")
|
||||
endif()
|
||||
else()
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL aarch64)
|
||||
set(LIB_TARGET "aarch64-unknown-linux-gnu")
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(LIB_TARGET "x86_64-unknown-linux-gnu")
|
||||
else()
|
||||
set(LIB_TARGET "i686-unknown-linux-gnu")
|
||||
@@ -67,4 +73,4 @@ function(cargo_build)
|
||||
add_library(${CARGO_NAME} STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(${CARGO_NAME} ${CARGO_NAME}_target)
|
||||
set_target_properties(${CARGO_NAME} PROPERTIES IMPORTED_LOCATION ${LIB_FILE})
|
||||
endfunction()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user