1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-12 23:55:50 +01:00

Update min-macos to 10.9

Since XCode 10, Apple does not recommend building for macOS <10.9

Reason - 10.7 and 10.8 require libstdc++

We enforce libc++ 

```# Shouldn't cmake do this???
   string( APPEND CMAKE_CXX_FLAGS " -stdlib=libc++" )```

While this generally works, it makes the proper dependency management tricky.
 
Compiler message for the library support:

```
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
```
This commit is contained in:
Dmitry Vedenko
2021-05-21 17:10:39 +03:00
committed by Dmitry Vedenko
parent 4fec5287ea
commit 576b7e66d2
3 changed files with 20 additions and 3 deletions

View File

@@ -78,13 +78,14 @@ cmake_policy( SET CMP0075 NEW )
# Definitions that must happen before the project() command
if( APPLE )
set( MIN_MACOS_VERSION 10.9 )
set( TARGET_MACOS_VERSION 10.13 )
# Generate schema files
set( CMAKE_XCODE_GENERATE_SCHEME ON )
# Define the OSX compatibility parameters
set( CMAKE_OSX_ARCHITECTURES x86_64 CACHE INTERNAL "" )
set( CMAKE_OSX_DEPLOYMENT_TARGET 10.7 CACHE INTERNAL "" )
set( CMAKE_OSX_DEPLOYMENT_TARGET ${MIN_MACOS_VERSION} CACHE INTERNAL "" )
set( CMAKE_OSX_SYSROOT macosx CACHE INTERNAL "" )
set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" CACHE INTERNAL "" )
@@ -121,6 +122,21 @@ project( Audacity )
# Load our functions/macros
include( AudacityFunctions )
# Allow user to globally set the library preference
cmd_option( ${_OPT}lib_preference
"Library preference [system (if available), local]"
"local"
STRINGS "system" "local"
)
# Special mode, that will force dependencies to the packages provided by system unless they were set to local explicitly.
cmd_option( ${_OPT}obey_system_dependencies
"Use system packages to satisfy dependencies"
Off
)
include( AudacityDependencies )
# Pull all the modules we'll need
include( CheckCXXCompilerFlag )
include( CheckIncludeFile )