Skip to content
Snippets Groups Projects
Commit e2d25440 authored by Dmitry Vedenko's avatar Dmitry Vedenko
Browse files

Use ld_classic when building with XCode 15

XCode 15 toolchain breaks the compatibility for
macOS version older than 12
parent 4191cfb8
No related branches found
No related tags found
No related merge requests found
......@@ -154,18 +154,25 @@ set( _OPT "audacity_" )
# Our very own project
project( Audacity )
if( APPLE )
# XCode 14 no longer allows building unsigned binaries.
# So for the XCode 14 `-` is passed as the code sign identity, which stands for
# local signing. `--deep` is passed, because 3d party libraries are copied unsigned.
# XCODE_VERSION is defined only after the project() command
if( APPLE )
if (XCODE_VERSION VERSION_LESS 14)
set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" CACHE INTERNAL "" )
else()
set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-" CACHE INTERNAL "" )
set( CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep -o linker-signed --timestamp" CACHE INTERNAL "")
endif()
# Xcode 15 breaks compatibility with macOS vesions older than 12
# https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking
if (XCODE_VERSION VERSION_GREATER_EQUAL 15)
# link_libraries is guaranteed to set the flag for all
# linker invocations
link_libraries("-Wl,-ld_classic")
endif()
endif()
# Load our functions/macros
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment