Browse Source

Revert "Change LINKFLAGS to FRAMEWORKS which is supported since Scons release 0.96.91"

This reverts commit 2e152b945f542056815c107c8ced96222302548f.

SCons `FRAMEWORKS` is, according to their latest docs, only supported
"On Mac OS X with gcc". While the "with gcc" part seems bogus, #36795
did introduce a link failure for our osxcross toolchain for compiling
macOS binaries from Linux. SCons probably fails to detect this as a
macOS target and does not use its `FRAMEWORKS` logic properly.

So using `LINKFLAGS` as we used to is the more portable solution.
Rémi Verschelde 5 years ago
parent
commit
e5526544a3
2 changed files with 3 additions and 4 deletions
  1. 2 2
      platform/osx/detect.py
  2. 1 2
      platform/server/detect.py

+ 2 - 2
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.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'OpenGL', 'AGL', 'AudioUnit', 'CoreAudio', 'CoreMIDI', 'IOKit', 'ForceFeedback', 'AVFoundation', 'CoreMedia', 'CoreVideo'])
-    env.Append(LIBS=['pthread', 'z'])
+    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.Append(CCFLAGS=['-mmacosx-version-min=10.9'])
     env.Append(LINKFLAGS=['-mmacosx-version-min=10.9'])

+ 1 - 2
platform/server/detect.py

@@ -228,8 +228,7 @@ def configure(env):
     env.Append(CPPDEFINES=['SERVER_ENABLED', 'UNIX_ENABLED'])
 
     if (platform.system() == "Darwin"):
-        env.AppendUnique(FRAMEWORKS=['Cocoa', 'Carbon', 'IOKit'])
-        env.Append(LIBS=['z'])
+        env.Append(LINKFLAGS=['-framework', 'Cocoa', '-framework', 'Carbon', '-lz', '-framework', 'IOKit'])
 
     env.Append(LIBS=['pthread'])