diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-06-21 04:34:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 04:34:38 +0200 |
commit | b03099f7b4d29acd06eca67914155f9425da92c1 (patch) | |
tree | b929a16bde002200f430ec4df0d44defd90f0481 /tools/rtc.py | |
parent | 32ae1d11958dcf04d0bd9c5c5ca98e21221a57d7 (diff) | |
parent | 85efdfd6ce365a0ac8502777b8c142be463cfe29 (diff) | |
download | fork-godot-webrtc-native-b03099f7b4d29acd06eca67914155f9425da92c1.tar.gz fork-godot-webrtc-native-b03099f7b4d29acd06eca67914155f9425da92c1.tar.bz2 fork-godot-webrtc-native-b03099f7b4d29acd06eca67914155f9425da92c1.zip |
Merge pull request #105 from Faless/build/tool_options
Linux ARM32/ARM64, better toolchains support.
Diffstat (limited to 'tools/rtc.py')
-rw-r--r-- | tools/rtc.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tools/rtc.py b/tools/rtc.py index 61b6bcc..a487b08 100644 --- a/tools/rtc.py +++ b/tools/rtc.py @@ -3,6 +3,7 @@ import os def rtc_cmake_config(env): config = { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" if env["debug_symbols"] else "Release", "USE_NICE": 0, "NO_WEBSOCKET": 1, "NO_EXAMPLES": 1, @@ -17,7 +18,7 @@ def rtc_cmake_config(env): return config -def build_library(env): +def build_library(env, ssl): if env["platform"] == "windows": env.PrependUnique(LIBS=["iphlpapi", "bcrypt"]) @@ -25,11 +26,10 @@ def build_library(env): rtc_env = env.Clone() rtc_targets = [env.Dir(env["RTC_BUILD"])] + env["RTC_LIBS"] - rtc_sources = [env.Dir(env["RTC_SOURCE"])] - rtc_env.Append(CMAKECONFFLAGS=["'-D%s=%s'" % it for it in rtc_cmake_config(env).items()]) + rtc_sources = [env.Dir(env["RTC_SOURCE"])] + ssl + rtc_env.Append(CMAKECONFFLAGS=["-D%s=%s" % it for it in rtc_cmake_config(env).items()]) rtc_env.Append(CMAKEBUILDFLAGS=["-t", "datachannel-static"]) - rtc = rtc_env.CMake(rtc_targets, rtc_sources, CMAKEBUILDTYPE=env["RTC_BUILD_TYPE"]) - rtc_env.Depends(rtc, rtc_env["SSL_LIBS"]) + rtc = rtc_env.CMake(rtc_targets, rtc_sources) return rtc @@ -39,10 +39,7 @@ def exists(env): def generate(env): env["RTC_SOURCE"] = env.Dir("#thirdparty/libdatachannel").abspath - env["RTC_BUILD_TYPE"] = "RelWithDebInfo" if env["debug_symbols"] else "Release" - env["RTC_BUILD"] = env.Dir( - "#bin/thirdparty/libdatachannel/{}/{}/{}".format(env["platform"], env["arch"], env["RTC_BUILD_TYPE"]) - ).abspath + env["RTC_BUILD"] = env.Dir("#bin/thirdparty/libdatachannel/{}/{}".format(env["platform"], env["arch"])).abspath env["RTC_INCLUDE"] = env["RTC_SOURCE"] + "/include" lib_ext = ".a" lib_prefix = "lib" |