summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2024-06-17 18:01:57 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2024-06-17 18:01:57 +0200
commit26bc56f934fc11ca3e213ca2d12dc4977e42d192 (patch)
tree89cfbaf0db40ede5a4ca5a0e1aff64db6c14ab9f /tools
parent44ee53715d1645b8d14cf8a28f1822981e5628eb (diff)
downloadfork-godot-webrtc-native-26bc56f934fc11ca3e213ca2d12dc4977e42d192.tar.gz
fork-godot-webrtc-native-26bc56f934fc11ca3e213ca2d12dc4977e42d192.tar.bz2
fork-godot-webrtc-native-26bc56f934fc11ca3e213ca2d12dc4977e42d192.zip
[SCons] Improve CMake and OpenSSL macOS/iOS targets
Update CI to macos-12 (since macos-11 is not longer available.
Diffstat (limited to 'tools')
-rw-r--r--tools/cmake.py5
-rw-r--r--tools/openssl.py8
2 files changed, 10 insertions, 3 deletions
diff --git a/tools/cmake.py b/tools/cmake.py
index 2911011..3ab7921 100644
--- a/tools/cmake.py
+++ b/tools/cmake.py
@@ -49,10 +49,9 @@ def cmake_default_flags(env):
config["CMAKE_OSX_ARCHITECTURES"] = '"x86_64;arm64"'
else:
config["CMAKE_OSX_ARCHITECTURES"] = env["arch"]
- if env["macos_deployment_target"] != "default":
+ if env.get("macos_deployment_target", "default") != "default":
config["CMAKE_OSX_DEPLOYMENT_TARGET"] = env["macos_deployment_target"]
-
- if env["platform"] == "macos" and sys.platform != "darwin" and "OSXCROSS_ROOT" in os.environ:
+ if sys.platform != "darwin" and "OSXCROSS_ROOT" in os.environ:
config["CMAKE_AR"] = env["AR"]
config["CMAKE_RANLIB"] = env["RANLIB"]
if env["arch"] == "universal":
diff --git a/tools/openssl.py b/tools/openssl.py
index 7b18210..52a37d0 100644
--- a/tools/openssl.py
+++ b/tools/openssl.py
@@ -79,7 +79,15 @@ def ssl_platform_flags(env):
if env.get("android_api_level", ""):
api = int(env["android_api_level"])
args.append("-D__ANDROID_API__=%s" % api)
+ elif env["platform"] == "ios":
+ if env.get("ios_min_version", "default") != "default":
+ if env.get("ios_simulator", False):
+ args.append("-mios-simulator-version-min=%s" % env["ios_min_version"])
+ else:
+ args.append("-miphoneos-version-min=%s" % env["ios_min_version"])
elif env["platform"] == "macos":
+ if env.get("macos_deployment_target", "default") != "default":
+ args.append("-mmacosx-version-min=%s" % env["macos_deployment_target"])
# OSXCross toolchain setup.
if sys.platform != "darwin" and "OSXCROSS_ROOT" in os.environ:
for k in ["CC", "CXX", "AR", "AS", "RANLIB"]: