mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-10 03:09:00 +08:00
GMP is building from arm64 to x86_64 on Mac
This commit is contained in:
parent
e1005f5dcc
commit
d71b4e07ef
13
deps/+GMP/GMP.cmake
vendored
13
deps/+GMP/GMP.cmake
vendored
@ -21,10 +21,20 @@ else ()
|
||||
set(_gmp_ccflags "${CMAKE_CXX_FLAGS_${_buildtype_upper}} -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
|
||||
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
set(_cross_compile_arg "")
|
||||
if (APPLE)
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
if (CMAKE_OSX_ARCHITECTURES)
|
||||
set(_gmp_build_tgt ${CMAKE_OSX_ARCHITECTURES})
|
||||
set(_gmp_ccflags "${_gmp_ccflags} -arch ${CMAKE_OSX_ARCHITECTURES}")
|
||||
endif ()
|
||||
if (${_gmp_build_tgt} MATCHES "arm")
|
||||
set(_gmp_build_tgt aarch64)
|
||||
endif()
|
||||
|
||||
if (CMAKE_OSX_ARCHITECTURES)
|
||||
set(_cross_compile_arg --host=${_gmp_build_tgt}-apple-darwin21)
|
||||
endif ()
|
||||
|
||||
set(_gmp_ccflags "${_gmp_ccflags} -mmacosx-version-min=${DEP_OSX_TARGET}")
|
||||
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-apple-darwin")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
@ -37,7 +47,6 @@ else ()
|
||||
set(_gmp_build_tgt "") # let it guess
|
||||
endif()
|
||||
|
||||
set(_cross_compile_arg "")
|
||||
if (CMAKE_CROSSCOMPILING)
|
||||
# TOOLCHAIN_PREFIX should be defined in the toolchain file
|
||||
set(_cross_compile_arg --host=${TOOLCHAIN_PREFIX})
|
||||
|
2
deps/CMakePresets.json
vendored
2
deps/CMakePresets.json
vendored
@ -25,7 +25,6 @@
|
||||
{
|
||||
"name": "mac_universal_x86",
|
||||
"inherits": "default",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-x86_64",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
@ -39,7 +38,6 @@
|
||||
{
|
||||
"name": "mac_universal_arm",
|
||||
"inherits": "default",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build-arm64",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
|
Loading…
x
Reference in New Issue
Block a user