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 2022-01-23 10:14:43.000000000 -0600 +++ CMakeLists.txt 2023-07-07 14:27:47.000000000 -0500 @@ -201,7 +201,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) ## Do our Apple OSX version setup -if (APPLE) +if (FALSE) 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") --- CMakeLists_Apple.cmake.orig 2022-01-23 10:16:42.000000000 -0600 +++ CMakeLists_Apple.cmake 2023-07-07 14:27:24.000000000 -0500 @@ -1,3 +1,4 @@ +if(FALSE) if(APPLE_12_00_X) set(OSXMINVER "12.00" CACHE STRING "OSX 12.00") if (WANT_OSX_SDK) @@ -172,17 +173,18 @@ message(STATUS "Apple Architecture: ${CMAKE_OSX_ARCHITECTURES}") message(STATUS "Apple SDK: ${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 "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fno-inline-functions -Wall") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g -fno-inline-functions -Wall") endif() if (WANT_RELEASEWITHDEBUG) - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -fno-inline-functions -Wall") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -fno-inline-functions -Wall") endif() if (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG) - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-inline-functions -Wall") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -fno-inline-functions -Wall") endif()