From 2e152b945f542056815c107c8ced96222302548f Mon Sep 17 00:00:00 2001 From: hungrymonkey Date: Tue, 3 Mar 2020 14:56:16 -0800 Subject: [PATCH] Change LINKFLAGS to FRAMEWORKS which is supported since Scons release 0.96.91 Fixes the link errors below clang: error: no such file or directory: 'Carbon' clang: error: no such file or directory: 'AudioUnit' clang: error: no such file or directory: 'CoreAudio' clang: error: no such file or directory: 'CoreMIDI' clang: error: no such file or directory: 'IOKit' clang: error: no such file or directory: 'ForceFeedback' clang: error: no such file or directory: 'CoreVideo' clang: error: no such file or directory: 'AVFoundation' clang: error: no such file or directory: 'CoreMedia' clang: error: no such file or directory: 'Metal' clang: error: no such file or directory: 'QuartzCore' Tested on System Version: macOS 10.15.3 (19D76) SCons by Steven Knight et al.: script: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog engine: v3.1.2.bee7caf9defd6e108fc2998a2520ddb36a967691, 2019-12-17 02:07:09, by bdeegan on octodog engine path: ['/usr/local/Cellar/scons/3.1.2_1/libexec/scons-local/SCons'] Xcode 11.3.1 Build version 11C504 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.3.0 Closes #36720 (cherry picked from commit c924e83a646f8a6d972ccd4d009acc323a6be158) --- platform/osx/detect.py | 4 ++-- platform/server/detect.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/osx/detect.py b/platform/osx/detect.py index fe839199e81..577788d3da3 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -149,8 +149,8 @@ def configure(env): env.Prepend(CPPPATH=['#platform/osx']) env.Append(CPPDEFINES=['OSX_ENABLED', 'UNIX_ENABLED', 'GLES_ENABLED', 'APPLE_STYLE_KEYS', 'COREAUDIO_ENABLED', 'COREMIDI_ENABLED']) - env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-framework', 'OpenGL', '-framework', 'AGL', '-framework', 'AudioUnit', '-framework', 'CoreAudio', '-framework', 'CoreMIDI', '-lz', '-framework', 'IOKit', '-framework', 'ForceFeedback', '-framework', 'AVFoundation', '-framework', 'CoreMedia', '-framework', 'CoreVideo']) - env.Append(LIBS=['pthread']) + env.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'OpenGL', 'AGL', 'AudioUnit', 'CoreAudio', 'CoreMIDI', 'IOKit', 'ForceFeedback', 'AVFoundation', 'CoreMedia', 'CoreVideo']) + env.Append(LIBS=['pthread', 'z']) env.Append(CCFLAGS=['-mmacosx-version-min=10.9']) env.Append(LINKFLAGS=['-mmacosx-version-min=10.9']) diff --git a/platform/server/detect.py b/platform/server/detect.py index d82df779575..b22b7b33651 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -224,7 +224,8 @@ def configure(env): env.Append(CPPDEFINES=['SERVER_ENABLED', 'UNIX_ENABLED']) if (platform.system() == "Darwin"): - env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-lz', '-framework', 'IOKit']) + env.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'IOKit']) + env.Append(LIBS=['z']) env.Append(LIBS=['pthread'])