summaryrefslogtreecommitdiffstats
path: root/media/webrtc/trunk/build/mac
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-07-31 20:27:48 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-07-31 20:47:28 -0400
commitc3ec6c6132c3339789dce5fdf4f2e68099f69711 (patch)
tree283f8b5b176255bf2199380c8392b397adf4682f /media/webrtc/trunk/build/mac
parent091749192cc7595a0013850fb450a5c1b6dde20b (diff)
downloadUXP-c3ec6c6132c3339789dce5fdf4f2e68099f69711.tar
UXP-c3ec6c6132c3339789dce5fdf4f2e68099f69711.tar.gz
UXP-c3ec6c6132c3339789dce5fdf4f2e68099f69711.tar.lz
UXP-c3ec6c6132c3339789dce5fdf4f2e68099f69711.tar.xz
UXP-c3ec6c6132c3339789dce5fdf4f2e68099f69711.zip
Use an alt script to properly determine the OSX SDK version
Diffstat (limited to 'media/webrtc/trunk/build/mac')
-rw-r--r--media/webrtc/trunk/build/mac/find_sdk_uxp.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/media/webrtc/trunk/build/mac/find_sdk_uxp.py b/media/webrtc/trunk/build/mac/find_sdk_uxp.py
new file mode 100644
index 000000000..cc4b440d2
--- /dev/null
+++ b/media/webrtc/trunk/build/mac/find_sdk_uxp.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+from __future__ import print_function
+import os
+import re
+import sys
+
+if sys.platform == 'darwin':
+ if len(sys.argv) <= 1:
+ print("find_sdk_uxp.py: error: Not enough arguments")
+ sys.exit(1)
+ else:
+ if os.path.isdir(sys.argv[1]):
+ SDK_PATH = sys.argv[1]
+ else:
+ print("find_sdk_uxp.py: error: Specified path does not exist or is not a directory")
+ sys.exit(1)
+
+ KNOWN_SDK_VERSIONS = ["10.7", "10.8", "10.9", "10.10",
+ "10.11", "10.12", "10.13", "10.14",
+ "10.15"]
+
+ REGEX = "^MacOSX(10\.\d+)\.sdk$"
+ SDK_VERSION = re.findall(REGEX, os.path.basename(SDK_PATH))
+
+ if not SDK_VERSION:
+ print("find_sdk_uxp.py: error: Could not determin the MacOS X SDK version")
+ sys.exit(1)
+
+ if SDK_VERSION[0] in KNOWN_SDK_VERSIONS:
+ print(SDK_VERSION[0])
+ else:
+ print("find_sdk_uxp.py: error: Unknown MacOS X SDK version")
+
+sys.exit(0)