r24775 by craig - Update build files for Apple Silicon
scribus-commit
scribus-commit at lists.scribus.net
Sun Dec 5 12:02:02 UTC 2021
Author: craig
Date: Sun Dec 5 12:02:01 2021
New Revision: 24775
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24775
Log:
Update build files for Apple Silicon
Modified:
trunk/Scribus/CMakeLists.txt
trunk/Scribus/CMakeLists_Apple.cmake
Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24775&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Sun Dec 5 12:02:01 2021
@@ -188,6 +188,12 @@
set(ARCH_ARM ON)
endif()
+string(REGEX MATCH "(arm64+)" _machine_arm "${MACHINE}")
+if (_machine_arm)
+ message(STATUS "Found target arm64")
+ set(ARCH_ARM_64 ON)
+endif()
+
# We need to pass -fPIC to lib2geom on amd64, mips, mipsel, and hppa. See:
# http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 and
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559133
@@ -198,6 +204,10 @@
if (APPLE)
if ((CMAKE_SIZEOF_VOID_P EQUAL 8) AND (ARCH_ARM))
string(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}")
+ if (_apple_ver EQUAL "21")
+ message(STATUS "Found macOS Monterey Target: Apple, 64 bit, ARM")
+ set(APPLE_12_00_X ON CACHE BOOL "Found macOS Monterey Target: Apple, 64 bit, ARM")
+ endif()
if (_apple_ver EQUAL "20")
message(STATUS "Found macOS Big Sur Target: Apple, 64 bit, ARM")
set(APPLE_11_00_X ON CACHE BOOL "Found macOS Big Sur Target: Apple, 64 bit, ARM")
@@ -205,6 +215,10 @@
endif()
if ((CMAKE_SIZEOF_VOID_P EQUAL 8) AND (ARCH_X86 OR ARCH_X86_64))
string(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}")
+ if (_apple_ver EQUAL "21")
+ message(STATUS "Found macOS Monterey Target: Apple, 64 bit, X86")
+ set(APPLE_12_00_X ON CACHE BOOL "Found macOS Monterey Target: Apple, 64 bit, X86")
+ endif()
if (_apple_ver EQUAL "20")
message(STATUS "Found macOS Big Sur Target: Apple, 64 bit, X86")
set(APPLE_11_00_X ON CACHE BOOL "Found macOS Big Sur Target: Apple, 64 bit, X86")
@@ -259,7 +273,7 @@
#convert any 64 bit build into generic 64 tag for below
-if (ARCH_X86_64 OR ARCH_SPARC_64 OR ARCH_MIPS_64 OR ARCH_PPC_64)
+if (ARCH_X86_64 OR ARCH_SPARC_64 OR ARCH_MIPS_64 OR ARCH_PPC_64 OR ARCH_ARM_64)
set(ARCH64BIT ON)
endif()
Modified: trunk/Scribus/CMakeLists_Apple.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24775&path=/trunk/Scribus/CMakeLists_Apple.cmake
==============================================================================
--- trunk/Scribus/CMakeLists_Apple.cmake (original)
+++ trunk/Scribus/CMakeLists_Apple.cmake Sun Dec 5 12:02:01 2021
@@ -134,6 +134,13 @@
message(STATUS "Setting PPC Architecture for OSX Build/Bundle")
set(CMAKE_OSX_ARCHITECTURES "ppc" )
set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc" )
+ elseif(ARCH_ARM_64)
+ message(STATUS "Setting ARM64 Architecture for OSX Build/Bundle")
+ set(CMAKE_OSX_ARCHITECTURES "arm64" )
+ set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "arm64" )
+ if (WANT_OSX_SDK)
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSXMINVER}")
+ endif()
else()
if (WANT_OSX_SDK)
set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSXMINVER}")
More information about the scribus-commit
mailing list