Merge pull request #5313 from xarbit/apple-silicon
Apple silicon support
This commit is contained in:
commit
4580456bad
15
deps/GMP/GMP.cmake
vendored
15
deps/GMP/GMP.cmake
vendored
@ -19,15 +19,18 @@ if (MSVC)
|
||||
else ()
|
||||
set(_gmp_ccflags "-O2 -DNDEBUG -fPIC -DPIC -Wall -Wmissing-prototypes -Wpointer-arith -pedantic -fomit-frame-pointer -fno-common")
|
||||
set(_gmp_build_tgt "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
if (APPLE)
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
set(_gmp_build_tgt aarch64)
|
||||
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")
|
||||
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
set(_gmp_ccflags "${_gmp_ccflags} -march=armv7-a") # Works on RPi-4
|
||||
set(_gmp_build_tgt armv7)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
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")
|
||||
set(_gmp_build_tgt "--build=${_gmp_build_tgt}-pc-linux-gnu")
|
||||
else ()
|
||||
set(_gmp_build_tgt "") # let it guess
|
||||
@ -35,7 +38,7 @@ else ()
|
||||
|
||||
ExternalProject_Add(dep_GMP
|
||||
# URL https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
|
||||
URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
|
||||
URL https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2
|
||||
BUILD_IN_SOURCE ON
|
||||
CONFIGURE_COMMAND env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
|
||||
BUILD_COMMAND make -j
|
||||
|
2
deps/PNG/PNG.cmake
vendored
2
deps/PNG/PNG.cmake
vendored
@ -8,6 +8,8 @@ prusaslicer_add_cmake_project(PNG
|
||||
-DPNG_STATIC=ON
|
||||
-DPNG_PREFIX=prusaslicer_
|
||||
-DPNG_TESTS=OFF
|
||||
-DDISABLE_DEPENDENCY_TRACKING=OFF
|
||||
-DPNG_ARM_NEON=off
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
|
Loading…
Reference in New Issue
Block a user