summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--waftools/checks/custom.py12
-rw-r--r--wscript_build.py7
2 files changed, 11 insertions, 8 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 3f627250f7..d887df5851 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -100,7 +100,17 @@ def check_cocoa(ctx, dependency_identifier):
includes = ctx.srcnode.abspath(),
linkflags = '-fobjc-arc')
- return fn(ctx, dependency_identifier)
+ res = fn(ctx, dependency_identifier)
+ if res and ctx.env.MACOS_SDK:
+ # on macOS we explicitly need to set the SDK path, otherwise it can lead
+ # to linking warnings or errors
+ ctx.env.append_value('LAST_LINKFLAGS', [
+ '-isysroot', ctx.env.MACOS_SDK,
+ '-L/usr/lib',
+ '-L/usr/local/lib'
+ ])
+
+ return res
def check_openal(ctx, dependency_identifier):
checks = [
diff --git a/wscript_build.py b/wscript_build.py
index 4b9b60e569..2c8b8c300b 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -154,13 +154,6 @@ def build(ctx):
bridge, header, tgt, src)
return task.exec_command(cmd)
- if ctx.dependency_satisfied('cocoa') and ctx.env.MACOS_SDK:
- # on macOS we explicitly need to set the SDK path, otherwise it can lead to
- # linking warnings or errors
- ctx.env.append_value('LINKFLAGS', [
- '-isysroot', ctx.env.MACOS_SDK
- ])
-
if ctx.dependency_satisfied('macos-cocoa-cb'):
swift_source = [
( "osdep/macOS_mpv_helper.swift" ),