diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-05-25 03:15:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-25 03:15:43 +0200 |
commit | eb65d88cd4ac6b0362517c7d718cbc9857c30ba3 (patch) | |
tree | 68a805c058287f6d2e494af62b9635daa7c48a5f /tools/rtc.py | |
parent | e34000653bba6b7f8ec6f2c16dcd87d7a01a3d68 (diff) | |
parent | e8de07dbb15ef235fb76f72b5ef5247d59c56936 (diff) | |
download | fork-godot-webrtc-native-eb65d88cd4ac6b0362517c7d718cbc9857c30ba3.tar.gz fork-godot-webrtc-native-eb65d88cd4ac6b0362517c7d718cbc9857c30ba3.tar.bz2 fork-godot-webrtc-native-eb65d88cd4ac6b0362517c7d718cbc9857c30ba3.zip |
Merge pull request #96 from Faless/fix/black
[CI] Fix python black formatting.
Diffstat (limited to 'tools/rtc.py')
-rw-r--r-- | tools/rtc.py | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/tools/rtc.py b/tools/rtc.py index 0e7330c..34da8eb 100644 --- a/tools/rtc.py +++ b/tools/rtc.py @@ -1,5 +1,6 @@ import os + def rtc_cmake_config(env): config = { "USE_NICE": 0, @@ -30,7 +31,9 @@ def rtc_cmake_config(env): config["CMAKE_SYSTEM_VERSION"] = api config["CMAKE_ANDROID_ARCH_ABI"] = abi config["ANDROID_ABI"] = abi - config["CMAKE_TOOLCHAIN_FILE"] = "%s/build/cmake/android.toolchain.cmake" % os.environ.get("ANDROID_NDK_ROOT", "") + config["CMAKE_TOOLCHAIN_FILE"] = "%s/build/cmake/android.toolchain.cmake" % os.environ.get( + "ANDROID_NDK_ROOT", "" + ) config["CMAKE_ANDROID_STL_TYPE"] = "c++_static" elif env["platform"] == "linux": march = "-m32" if env["arch"] == "x86_32" else "-m64" @@ -49,7 +52,7 @@ def rtc_cmake_config(env): config["CMAKE_OSX_DEPLOYMENT_TARGET"] = "11.0" config["CMAKE_OSX_ARCHITECTURES"] = env["arch"] if env["ios_simulator"]: - config["CMAKE_OSX_SYSROOT"] = "iphonesimulator" + config["CMAKE_OSX_SYSROOT"] = "iphonesimulator" elif env["platform"] == "windows": config["CMAKE_SYSTEM_NAME"] = "Windows" config["BUILD_WITH_WARNINGS"] = "0" # Disables werror in libsrtp. @@ -58,7 +61,10 @@ def rtc_cmake_config(env): def rtc_emitter(target, source, env): env.Depends(env["RTC_LIBS"], env["SSL_LIBS"]) - env.Depends(env["RTC_LIBS"], [env.File(__file__), env.Dir(env["RTC_SOURCE"]), env.File(env["RTC_SOURCE"] + "/CMakeLists.txt")]) + env.Depends( + env["RTC_LIBS"], + [env.File(__file__), env.Dir(env["RTC_SOURCE"]), env.File(env["RTC_SOURCE"] + "/CMakeLists.txt")], + ) return env["RTC_LIBS"], env.Dir(env["RTC_SOURCE"]) @@ -80,15 +86,16 @@ def generate(env): env["RTC_SOURCE"] = env["DEPS_SOURCE"] + "/libdatachannel" env["RTC_BUILD"] = env["DEPS_BUILD"] + "/libdatachannel" env["RTC_INCLUDE"] = env["RTC_SOURCE"] + "/include" - env["RTC_LIBS"] = [env.File(env["RTC_BUILD"] + "/" + lib) for lib in [ - "libdatachannel-static.a", - "deps/libjuice/libjuice-static.a", - "deps/libsrtp/libsrtp2.a", - "deps/usrsctp/usrsctplib/libusrsctp.a" - ]] - env.Append(BUILDERS={ - "BuildLibDataChannel": env.Builder(action=rtc_action, emitter=rtc_emitter) - }) + env["RTC_LIBS"] = [ + env.File(env["RTC_BUILD"] + "/" + lib) + for lib in [ + "libdatachannel-static.a", + "deps/libjuice/libjuice-static.a", + "deps/libsrtp/libsrtp2.a", + "deps/usrsctp/usrsctplib/libusrsctp.a", + ] + ] + env.Append(BUILDERS={"BuildLibDataChannel": env.Builder(action=rtc_action, emitter=rtc_emitter)}) env.Append(LIBPATH=[env["RTC_BUILD"]]) env.Append(CPPPATH=[env["RTC_INCLUDE"]]) env.Prepend(LIBS=env["RTC_LIBS"]) |