diff options
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"]) |