Fix build on new macOS versions by deleting the macOS version detection code. Don't override macOS arch and deployment target settings. https://bugs.scribus.net/view.php?id=16975 --- CMakeLists.txt.orig 2019-03-05 16:44:45.000000000 -0600 +++ CMakeLists.txt 2023-07-07 15:04:49.000000000 -0500 @@ -121,7 +121,7 @@ SET(ARCH_X86_64 1) ENDIF (_machine_x86_64) -IF (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1)) +IF (FALSE) STRING(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}") IF (_apple_ver EQUAL "14") MESSAGE(STATUS "Found OSX Yosemite Target: Apple, 64 bit, X86") @@ -437,6 +437,7 @@ #Based on our build type, setup our build options IF(APPLE) + IF(FALSE) IF(APPLE_10_10_X) SET(OSXMINVER "10.10" CACHE TYPE STRING) IF (WANT_OSX_SDK) @@ -509,19 +510,20 @@ ENDIF(WANT_UNIVERSAL_BUNDLE) MESSAGE(STATUS "${CMAKE_OSX_ARCHITECTURES} ${CMAKE_OSX_SYSROOT}") SET(ENV{MACOSX_DEPLOYMENT_TARGET} ${OSXMINVER} ) + ENDIF() SET(ENV{LD_PREBIND} 1 ) SET(ENV{LD_PREBIND_ALLOW_OVERLAP} 1 ) IF (WANT_DEBUG) - SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") - SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall") + SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall") ENDIF (WANT_DEBUG) IF (WANT_RELEASEWITHDEBUG) - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 -fno-inline-functions -Wall") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g3 -fno-inline-functions -Wall") ENDIF (WANT_RELEASEWITHDEBUG) IF (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG) - SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") - SET(CMAKE_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") + SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall") + SET(CMAKE_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall") ENDIF (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG) ELSE(APPLE) IF(${CMAKE_GENERATOR} MATCHES "^(Visual Studio|NMake).*")